/* Couche de refonte client Martha (VISUEL-08 et suivants).
   Un seul fichier, charge en dernier dans index.html, porte toute la refonte
   visuelle cote client pour rester tracable commit par commit. VISUEL-12
   applique les mêmes couleurs de fondation à tous les espaces secondaires. */

/* VISUEL-08 — Stats (vue d'ensemble) alignée sur la palette crème/or de la
   maquette Sasha. Cette couche conserve ses détails propres ; VISUEL-12
   étend ensuite les mêmes couleurs aux autres espaces métier. Aucune donnée
   n'est modifiée ici : les valeurs réelles (#cash, #committed, #spent,
   #revenue, listes de checkpoints/événements) restent celles calculées par
   le runtime. */
html body#martha-app.martha-design-system.martha-client-secondary #view-overview {
  --martha-ref-background: #FBFAF7;
  --martha-ref-foreground: #171717;
  --martha-ref-card: #FFFDF9;
  --martha-ref-muted-foreground: #878787;
  --martha-ref-border: #E8DFCC;
  --martha-ds-ink-strong: #171717;
  --martha-ds-ink-soft: #A86D1D;
  --martha-ds-gold-bright: #E8B84F;
  --line: #E8DFCC;
  --line-strong: #DCCFAF;
  --muted: #878787;
  --green: #6E7F5C;
  background: #FBFAF7 !important;
  color: #171717;
}

html body#martha-app.martha-design-system.martha-client-secondary #view-overview .hero {
  border: 1px solid #E8DFCC;
  background: linear-gradient(135deg, #FFFDF9, #F8F0E2);
  box-shadow: 0 10px 30px rgba(184, 134, 58, .08);
}

html body#martha-app.martha-design-system.martha-client-secondary #view-overview .hero h2 {
  font-family: Fraunces, Georgia, 'Times New Roman', serif;
  color: #171717;
}

html body#martha-app.martha-design-system.martha-client-secondary #view-overview .pill.warning {
  color: #7A5A22;
  background: #F4DA9E;
}

html body#martha-app.martha-design-system.martha-client-secondary #view-overview .metric,
html body#martha-app.martha-design-system.martha-client-secondary #view-overview .panel {
  border: 1px solid #E8DFCC;
  border-radius: 16px;
  background: #FFFDF9;
}

html body#martha-app.martha-design-system.martha-client-secondary #view-overview .metric strong {
  color: #A86D1D;
}

html body#martha-app.martha-design-system.martha-client-secondary #view-overview .panel h3 {
  font-family: Fraunces, Georgia, 'Times New Roman', serif;
  color: #171717;
}

html body#martha-app.martha-design-system.martha-client-secondary #view-overview .count {
  color: #171717;
  background: #F4DA9E;
}

html body#martha-app.martha-design-system.martha-client-secondary #view-overview .event {
  border-bottom-color: #E8DFCC;
}

html body#martha-app.martha-design-system.martha-client-secondary #view-overview .event-title {
  color: #171717;
}

html body#martha-app.martha-design-system.martha-client-secondary #view-overview .text-button {
  color: #A86D1D;
}

/* VISUEL-09 — coquille partagée (barre latérale + barre du haut) alignée
   crème/or pour toutes les vues secondaires. */
html body#martha-app.martha-design-system.martha-client-secondary {
  /* Valeurs partagées par la navigation secondaire ; la normalisation
     complète du contenu est regroupée dans VISUEL-12, plus bas. */
  --martha-ref-background: #FBFAF7;
  --martha-ref-foreground: #171717;
  --martha-ref-card: #FFFDF9;
  --martha-ref-popover: #FFFDF9;
  --martha-ref-elevated: #F4EEE4;
  --martha-ref-muted-foreground: #878787;
  --martha-ref-accent: #F8F0E2;
  --martha-ref-border: #E8DFCC;
  --martha-ref-input: #E8D5AC;
  --martha-ref-ring: #D1A04E;
  --martha-ref-sidebar: #FFFDF9;
  --martha-ref-gold: #A86D1D;
  --martha-ref-gold-bright: #E8B84F;
  --line: #E8DFCC;
  --line-strong: #DCCFAF;
  background: radial-gradient(circle at 72% -12%, rgba(232, 208, 150, .22), transparent 36%), #FBFAF7 !important;
  color: #171717;
}

html body#martha-app.martha-design-system.martha-client-secondary .nav-item:hover,
html body#martha-app.martha-design-system.martha-client-secondary .nav-item.active {
  border-color: #E8DFCC;
  background: linear-gradient(90deg, #F8EED8, rgba(248, 238, 216, .3));
  color: #171717;
}
html body#martha-app.martha-design-system.martha-client-secondary .sidebar-footer {
  border-top: 1px solid #E8DFCC;
  color: #878787;
}
html body#martha-app.martha-design-system.martha-client-secondary .avatar {
  border-color: #E8DFCC;
  color: #171717;
  background: #F4DA9E;
}

html body#martha-app.martha-design-system.martha-client-secondary .topbar {
  border-bottom-color: #E8DFCC;
}
html body#martha-app.martha-design-system.martha-client-secondary .topbar h1,
html body#martha-app.martha-design-system.martha-client-secondary .eyebrow {
  color: #171717;
}
html body#martha-app.martha-design-system.martha-client-secondary .ghost {
  color: #A86D1D;
  background: #FFFDF9;
  border-color: #E8DFCC;
}

/* VISUEL-10/11 — écran Discussion fidèle à la maquette, à toute taille.
   Mesures relevées sur la maquette (720 px de large, ramenée à 390 px) :
   boutons ronds 38 px, onglets 174×37, logo ~155 px de haut, titre sur deux
   lignes ~30 px, zone de saisie 377×103, pastilles 30 px, envoi 42 px.
   VISUEL-02/04 plaçaient l'accueil et la zone de saisie en position absolue
   avec des tailles environ doublées (zone de saisie 190 px, titre 52 px) :
   sur un écran d'ordinateur, le titre passait sous la zone de saisie, qui
   s'étalait sur toute la largeur. Ici tout est en colonne (en-tête, contenu,
   saisie) : rien ne peut plus se chevaucher, quelle que soit la hauteur. */
html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-main > .martha-client-mobile-header {
  flex: 0 0 auto;
  height: auto;
  min-height: 0;
  padding: max(20px, env(safe-area-inset-top)) 18px 0;
  grid-template-columns: 44px minmax(0, 1fr) 72px;
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-main > .martha-client-mobile-header > :is(.martha-client-mobile-menu, .martha-client-mobile-new) {
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  padding: 10px;
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-main > .martha-client-mobile-header .martha-client-mobile-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 2px;
  width: 72px;
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-main > .martha-client-mobile-header .martha-client-mobile-actions .martha-client-mobile-browser {
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  min-width: 32px;
  min-height: 32px;
  padding: 7px;
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-main > .martha-client-mobile-header .martha-client-mobile-actions .martha-client-mobile-browser svg {
  width: 16px;
  height: 16px;
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-main .martha-reference-chat-tabs {
  width: 190px;
  height: 40px;
  padding: 3px;
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-main .martha-reference-chat-tabs button {
  height: 32px;
  min-height: 32px;
  font-size: 14px;
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-main > .martha-cockpit-welcome {
  position: relative !important;
  inset: auto !important;
  flex: 1 1 auto;
  min-height: 0;
  justify-content: flex-start !important;
  padding: 12px 20px !important;
  overflow: hidden;
}

/* Répartition verticale de la maquette : un peu d'air au-dessus du logo,
   nettement plus entre le titre et la zone de saisie. */
html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-main > .martha-cockpit-welcome::before,
html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-main > .martha-cockpit-welcome::after {
  display: block;
  flex: 1 1 0;
  content: '';
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-main > .martha-cockpit-welcome::after {
  flex-grow: 2;
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-main .martha-reference-chat-brand {
  width: auto;
  max-width: none;
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-main .martha-reference-chat-logo {
  width: auto !important;
  height: min(clamp(140px, 24vh, 240px), 47vw) !important;
  object-fit: contain;
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-main .martha-reference-chat-hero h1 {
  margin: clamp(10px, 2.6vh, 26px) 0 0 !important;
  font-size: min(clamp(26px, 4.2vh, 42px), 7.6vw) !important;
  line-height: 1.08;
  letter-spacing: -.03em;
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-main > .martha-chat-composer-wrap {
  position: relative !important;
  inset: auto !important;
  z-index: 3;
  flex: 0 0 auto;
  width: min(760px, calc(100% - 24px)) !important;
  margin: 0 auto max(18px, env(safe-area-inset-bottom)) !important;
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-main .martha-chat-composer {
  height: auto !important;
  min-height: 0 !important;
  gap: 6px;
  padding: 12px 10px 10px !important;
  border-radius: 26px !important;
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-main .martha-chat-composer textarea {
  width: calc(100% - 16px);
  min-height: 36px !important;
  max-height: 160px !important;
  margin: 0 0 0 10px !important;
  padding: 6px 8px !important;
  font-size: 16px !important;
  line-height: 1.45;
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-main .martha-chat-composer-tools {
  flex: 0 0 auto !important;
  gap: 0;
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-main :is(.martha-chat-composer-left, .martha-client-composer-primary) {
  gap: 8px !important;
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-main :is(.martha-client-composer-plus, .martha-chat-composer-right .martha-chat-tool) {
  flex: 0 0 38px !important;
  width: 38px !important;
  height: 38px !important;
  min-width: 38px !important;
  min-height: 38px !important;
  padding: 9px !important;
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-main .martha-reference-composer-pill {
  gap: 6px !important;
  height: 32px !important;
  min-height: 32px !important;
  padding: 0 10px 0 9px !important;
  font-size: 13px !important;
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-main .martha-reference-composer-icon {
  display: grid !important;
  place-items: center;
  flex: 0 0 18px !important;
  width: 18px !important;
  height: 18px !important;
  color: #A86D1D;
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-main .martha-reference-composer-icon svg {
  width: 18px !important;
  height: 18px !important;
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-main .martha-client-menu[data-menu="autonomy"] .martha-reference-composer-pill::after {
  display: block !important;
  width: 7px;
  height: 7px;
  margin: -3px 1px 0 4px;
  border-right: 1.6px solid #6B4A1C;
  border-bottom: 1.6px solid #6B4A1C;
  flex: 0 0 auto;
  transform: rotate(45deg);
  content: '' !important;
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-main .martha-client-menu[data-menu="autonomy"] {
  flex: 0 1 auto !important;
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-main .martha-client-menu[data-menu="autonomy"] .martha-reference-composer-pill {
  width: auto !important;
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-main .martha-chat-composer-right {
  gap: 8px !important;
  margin-left: 8px !important;
  padding-left: 8px !important;
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-main :is(.martha-chat-send, .martha-chat-stop),
html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-main .martha-chat-send:disabled {
  flex: 0 0 42px !important;
  width: 42px !important;
  height: 42px !important;
  min-width: 42px !important;
  min-height: 42px !important;
  padding: 10px !important;
  border: 0 !important;
  color: #FFFDF9 !important;
  background: linear-gradient(145deg, #F0C66A 0%, #D18E24 100%) !important;
  box-shadow: 0 8px 18px rgba(175, 117, 20, .26), inset 0 1px 1px rgba(255, 240, 188, .76) !important;
  opacity: 1 !important;
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-main :is(.martha-chat-send, .martha-chat-stop) svg {
  width: 20px !important;
  height: 20px !important;
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha #martha-chat-status {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  white-space: nowrap !important;
}

/* La conversation (dès qu'un message existe) prend la place de l'accueil,
   dans le même flux en colonne. VISUEL-02 la masquait en permanence. */
html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-main:has(.martha-chat-message) > .martha-chat-feed {
  position: relative !important;
  inset: auto !important;
  z-index: 2;
  display: block !important;
  flex: 1 1 auto;
  min-height: 0;
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 16px max(20px, calc((100% - 760px) / 2)) 24px !important;
  overflow-y: auto !important;
  scrollbar-width: thin;
  scrollbar-color: #E4D3AE transparent;
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-feed .martha-chat-message {
  display: flex;
  margin: 0 0 22px;
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-feed .martha-chat-message.user {
  justify-content: flex-end;
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-feed .martha-chat-message-avatar {
  display: none !important;
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-feed .martha-chat-message-body {
  display: flex;
  flex-direction: column;
  min-width: 0;
  max-width: 100%;
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-feed .martha-chat-message.user .martha-chat-message-body {
  align-items: flex-end;
  max-width: 80%;
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-feed .martha-chat-message.user .martha-chat-message-bubble {
  width: auto;
  padding: 11px 17px;
  border: 1px solid #EAD3A0;
  border-radius: 22px 22px 6px 22px;
  color: #171717;
  background: linear-gradient(180deg, #FFF7E6 0%, #F7E2B3 100%);
  box-shadow: 0 6px 16px rgba(164, 112, 32, .08);
  font-size: 15px;
  line-height: 1.55;
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-feed .martha-chat-message.assistant .martha-chat-message-bubble {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  color: #171717;
  font-size: 15.5px;
  line-height: 1.7;
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-feed :is(.martha-chat-message-meta:not(.martha-chat-citations), .martha-chat-message-label, .martha-chat-live-badge) {
  display: none !important;
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-feed .martha-chat-citations {
  margin-top: 8px;
  color: #8A7F6E;
  font-size: 12px;
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-feed .martha-chat-message-actions {
  gap: 4px;
  margin-top: 6px;
  opacity: 0;
  transition: opacity .15s ease;
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-feed .martha-chat-message:is(:hover, :focus-within) .martha-chat-message-actions {
  opacity: 1;
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-feed .martha-chat-message-action {
  height: 26px;
  padding: 0 10px;
  border: 1px solid #EDE3D1;
  border-radius: 999px;
  color: #8A7F6E;
  background: #FFFDF9;
  font-size: 12px;
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-feed :is(.martha-chat-thinking, .martha-chat-error) {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  width: fit-content;
  margin: 0 0 22px;
  padding: 9px 15px;
  border: 1px solid #EDE3D1;
  border-radius: 999px;
  color: #8A7F6E;
  background: #FFFDF9;
  font-size: 13.5px;
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-feed .martha-chat-error {
  border-color: #E9C2B8;
  border-radius: 16px;
  color: #8A3E30;
  background: #FFF6F2;
}

@media (max-width: 640px) {
  html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-main > .martha-client-mobile-header {
    padding: max(16px, env(safe-area-inset-top)) 14px 0;
  }
  html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-main > .martha-client-mobile-header > :is(.martha-client-mobile-menu, .martha-client-mobile-new) {
    width: 38px;
    height: 38px;
    min-width: 38px;
    min-height: 38px;
    padding: 9px;
  }
  html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-main > .martha-client-mobile-header .martha-client-mobile-actions .martha-client-mobile-new {
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    min-width: 38px;
    min-height: 38px;
  }
  html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-main .martha-reference-chat-tabs {
    width: 174px;
    height: 38px;
  }
  html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-main .martha-reference-chat-tabs button {
    height: 30px;
    min-height: 30px;
  }
  html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-main .martha-reference-chat-logo {
    transform: none;
    filter: saturate(1.08) brightness(1.02) drop-shadow(0 10px 10px rgba(151, 95, 16, .14));
  }
  html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-main > .martha-chat-composer-wrap {
    width: calc(100% - 14px) !important;
    margin-bottom: max(12px, env(safe-area-inset-bottom)) !important;
  }
  html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-main > .martha-cockpit-welcome::after {
    flex-grow: 3;
  }
  html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-main .martha-chat-composer {
    padding: 11px 7px 8px !important;
  }
  html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-main :is(.martha-chat-composer-left, .martha-client-composer-primary) {
    flex-wrap: nowrap !important;
    gap: 5px !important;
  }
  html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-main :is(.martha-client-composer-plus, .martha-chat-composer-right .martha-chat-tool) {
    flex-basis: 36px !important;
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    min-height: 36px !important;
    padding: 8px !important;
  }
  html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-main .martha-reference-composer-pill {
    gap: 4px !important;
    padding: 0 7px 0 6px !important;
    font-size: 12px !important;
  }
  html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-main .martha-reference-composer-icon,
  html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-main .martha-reference-composer-icon svg {
    flex-basis: 16px !important;
    width: 16px !important;
    height: 16px !important;
  }
  html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-main .martha-client-menu[data-menu="autonomy"] .martha-reference-composer-pill::after {
    width: 6px;
    height: 6px;
    margin-left: 2px;
  }
  html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-main .martha-chat-composer-right {
    gap: 6px !important;
    margin-left: 6px !important;
    padding-left: 6px !important;
  }
  html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-main :is(.martha-chat-send, .martha-chat-stop),
  html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-main .martha-chat-send:disabled {
    flex-basis: 40px !important;
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    min-height: 40px !important;
  }
  html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-feed .martha-chat-message.user .martha-chat-message-body {
    max-width: 86%;
  }
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-sidebar .martha-drawer-close {
  position: absolute;
  top: 16px;
  right: 14px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid #E8D5AC;
  border-radius: 50%;
  color: #8A581A;
  background: #FFFDF9;
  box-shadow: 0 6px 16px rgba(166, 112, 29, .08);
  cursor: pointer;
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-sidebar .martha-drawer-close svg {
  width: 17px;
  height: 17px;
}
html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-sidebar .martha-client-see-all {
  font-size: 0;
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-sidebar .martha-client-see-all::after {
  content: 'Voir tout ›';
  font-size: 13px;
}

/* Le retour « Message envoyé. » reste annoncé aux lecteurs d'écran mais ne
   s'affiche plus dans la zone de saisie : le message apparaît dans le fil. */
html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-composer-wrap .martha-form-feedback {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: 0 !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  white-space: nowrap !important;
}

/* VISUEL-14 — raisonnement en cours : une ligne discrète qui suit les vraies
   étapes de Martha, et le détail repliable (« Voir le détail »). Remplace la
   carte « EN COURS » de l'ancien thème. */
html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-feed .martha-chat-message-thinking {
  margin: 0 0 22px;
  /* Pas d'animation d'entrée : l'indicateur est remplacé à chaque étape et
     rejouerait son apparition. */
  animation: none;
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-feed .martha-thinking {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-feed .martha-thinking-line {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 26px;
  font-size: 15px;
  line-height: 1.4;
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-feed .martha-thinking-mark {
  display: grid;
  place-items: center;
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  color: #A86D1D;
  opacity: .7;
  animation: none;
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-feed .martha-thinking-mark svg {
  width: 18px;
  height: 18px;
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-feed .martha-thinking-text {
  min-width: 0;
  color: #817667;
  font-size: 13px;
  font-weight: 450;
  background: none;
  animation: none;
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-feed .martha-thinking-elapsed {
  flex: 0 0 auto;
  color: #B3A893;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-feed .martha-thinking-detail {
  margin-left: 32px;
  color: #6F6555;
  font-size: 13px;
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-feed .martha-thinking-detail summary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  color: #A86D1D;
  cursor: pointer;
  list-style: none;
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-feed .martha-thinking-detail summary::-webkit-details-marker {
  display: none;
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-feed .martha-thinking-detail summary::after {
  width: 6px;
  height: 6px;
  margin-top: -3px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  transition: transform .15s ease;
  content: '';
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-feed .martha-thinking-detail[open] summary::after {
  margin-top: 3px;
  transform: rotate(-135deg);
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-feed .martha-thinking-detail ol {
  display: grid;
  gap: 6px;
  margin: 8px 0 0;
  padding: 10px 0 2px 14px;
  border-left: 1px solid #EFE5D2;
  list-style: none;
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-feed .martha-thinking-detail li {
  position: relative;
  padding-left: 20px;
  line-height: 1.45;
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-feed .martha-thinking-detail li::before {
  position: absolute;
  top: .15em;
  left: 0;
  color: #6E7F5C;
  content: '✓';
  font-size: 12px;
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-feed .martha-thinking-detail li[data-state="active"] {
  color: #3B342C;
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-feed .martha-thinking-detail li[data-state="active"]::before {
  top: .45em;
  left: 2px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #D9A441;
  content: '';
  animation: martha-thinking-pulse 1.6s ease-in-out infinite;
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-feed .martha-chat-live-work {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid #EFE5D2;
  color: #6F6555;
  font-size: 12px;
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-feed .martha-chat-live-work p {
  margin: 0 0 6px;
  color: #817667;
  font-variant-numeric: tabular-nums;
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-feed .martha-chat-live-work ol {
  display: grid;
  gap: 5px;
  margin: 0;
  padding: 0 0 0 14px;
  list-style: none;
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-feed .martha-chat-live-work li {
  position: relative;
  padding-left: 20px;
  line-height: 1.45;
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-feed .martha-chat-live-work li::before {
  position: absolute;
  top: .45em;
  left: 2px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #D9A441;
  content: '';
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-feed .martha-chat-live-work li[data-state="done"]::before {
  top: .15em;
  left: 0;
  width: auto;
  height: auto;
  border-radius: 0;
  background: transparent;
  color: #6E7F5C;
  content: '✓';
  font-size: 12px;
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-feed .martha-thinking-detail li[data-state="failed"]::before {
  color: #9A4B3E;
  content: '×';
  font-size: 15px;
  font-weight: 700;
}

@keyframes martha-thinking-shimmer {
  from { background-position: 100% 0; }
  to { background-position: -150% 0; }
}

@keyframes martha-thinking-pulse {
  0%, 100% { opacity: .55; transform: scale(.94); }
  50% { opacity: 1; transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-feed :is(.martha-thinking-mark, .martha-thinking-text, .martha-thinking-detail li) {
    animation: none !important;
  }
  html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-feed .martha-thinking-text {
    color: #5E5547;
    background: none;
  }
}

/* Pendant une réponse, « Arrêter » remplace « Envoyer » au lieu de s'y ajouter. */
html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-composer:has(.martha-chat-stop:not([hidden])) .martha-chat-send {
  display: none !important;
}

/* VISUEL-15 — mise en forme des réponses (CAP-RCH-017) : code, liens,
   tableaux et citations dans la palette crème/or. */
html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-feed .martha-chat-message-bubble :is(p, ul, ol, blockquote, .martha-chat-code, .martha-chat-table) {
  margin: 0 0 12px;
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-feed .martha-chat-message-bubble > :last-child {
  margin-bottom: 0;
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-feed .martha-chat-message-bubble :is(ul, ol) {
  padding-left: 22px;
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-feed .martha-chat-message-bubble li + li {
  margin-top: 4px;
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-feed .martha-chat-message-bubble h3 {
  margin: 18px 0 8px;
  color: #171717;
  font-size: 16px;
  font-weight: 600;
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-feed .martha-chat-message-bubble a {
  color: #A86D1D;
  text-decoration: underline;
  text-decoration-color: rgba(168, 109, 29, .35);
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-feed .martha-chat-message-bubble a:hover {
  text-decoration-color: currentColor;
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-feed .martha-chat-message-bubble :not(pre) > code {
  padding: 1px 6px;
  border: 1px solid #EFE5D2;
  border-radius: 6px;
  color: #6B4A1C;
  background: #FAF4E8;
  font-size: .9em;
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-feed .martha-chat-code {
  position: relative;
  overflow: hidden;
  border: 1px solid #EADFC9;
  border-radius: 14px;
  background: #FAF6EE;
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-feed .martha-chat-code-language {
  display: block;
  padding: 7px 14px;
  border-bottom: 1px solid #EFE5D2;
  color: #8A7F6E;
  font-size: 12px;
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-feed .martha-chat-code pre {
  margin: 0;
  padding: 12px 14px;
  overflow-x: auto;
  color: #2B2620;
  font: 13px/1.6 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  white-space: pre;
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-feed .martha-chat-message-bubble blockquote {
  padding: 2px 0 2px 14px;
  border-left: 3px solid #E8D5AC;
  color: #5E5547;
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-feed .martha-chat-table {
  display: block;
  max-width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
  font-size: 14px;
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-feed .martha-chat-table :is(th, td) {
  padding: 8px 12px;
  border-bottom: 1px solid #EFE5D2;
  color: #171717;
  background: transparent;
  text-align: left;
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-feed .martha-chat-table th {
  color: #6F6555;
  font-weight: 600;
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-feed .martha-chat-stream-cursor {
  display: inline-block;
  width: 7px;
  height: 1.05em;
  margin-left: 2px;
  border-radius: 2px;
  background: #D9A441;
  vertical-align: text-bottom;
  animation: martha-thinking-pulse 1s ease-in-out infinite;
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-feed .martha-chat-code pre code {
  padding: 0;
  border: 0;
  border-radius: 0;
  color: inherit;
  background: none;
  font: inherit;
}

/* Pulsar est le seul modèle de Martha : pastille fixe, sans menu ni chevron. */
html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-main .martha-model-fixed {
  display: inline-flex !important;
  align-items: center;
  cursor: default;
}

/* VISUEL-16 — action proposée par Martha sous sa réponse (CAP-RCH-019) :
   résumé clair, informations manquantes, un seul bouton « Confirmer ». */
html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-feed .martha-chat-action-proposals {
  display: grid;
  gap: 10px;
  width: min(100%, 520px);
  margin-top: 4px;
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-feed .martha-chat-action-proposal {
  display: grid;
  gap: 12px;
  padding: 16px 18px;
  border: 1px solid #EAD3A0;
  border-radius: 18px;
  background: linear-gradient(180deg, #FFFDF9 0%, #FBF4E6 100%);
  box-shadow: 0 8px 22px rgba(164, 112, 32, .08);
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-feed .martha-chat-action-proposal-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-feed .martha-chat-action-proposal-heading strong {
  color: #171717;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.45;
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-feed .martha-proposal-status {
  flex: 0 0 auto;
  padding: 3px 10px;
  border-radius: 999px;
  color: #7A5A22;
  background: #F4DA9E;
  font-size: 12px;
  font-weight: 500;
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-feed .martha-chat-action-proposal[data-status="SUCCEEDED"] .martha-proposal-status {
  color: #3F5230;
  background: #DDE6D2;
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-feed .martha-chat-action-proposal:is([data-status="FAILED"], [data-status="UNKNOWN"]) .martha-proposal-status {
  color: #8A3E30;
  background: #F6DDD6;
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-feed .martha-proposal-fields {
  display: grid;
  gap: 10px;
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-feed .martha-proposal-fields > p {
  margin: 0;
  color: #6F6555;
  font-size: 13.5px;
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-feed .martha-proposal-field {
  display: grid;
  gap: 5px;
  color: #3B342C;
  font-size: 13px;
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-feed .martha-proposal-field :is(input:not([type="checkbox"]), select) {
  width: 100%;
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid #E8D5AC;
  border-radius: 12px;
  color: #171717;
  background: #FFFDF9;
  font: inherit;
  font-size: 15px;
  box-sizing: border-box;
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-feed .martha-proposal-field :is(input, select):focus-visible {
  border-color: #D1A04E;
  outline: 2px solid rgba(209, 160, 78, .25);
  outline-offset: 1px;
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-feed .martha-proposal-check {
  display: flex;
  align-items: center;
  gap: 8px;
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-feed .martha-proposal-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-feed .martha-proposal-run {
  min-height: 40px;
  padding: 0 20px;
  border: 0;
  border-radius: 999px;
  color: #FFFDF9;
  background: linear-gradient(145deg, #F0C66A 0%, #D18E24 100%);
  box-shadow: 0 6px 14px rgba(175, 117, 20, .22), inset 0 1px 1px rgba(255, 240, 188, .7);
  font: inherit;
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-feed .martha-proposal-run:disabled {
  opacity: .55;
  cursor: progress;
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-feed .martha-proposal-actions small {
  color: #8A7F6E;
  font-size: 12.5px;
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-feed .martha-proposal-feedback {
  margin: 0;
  color: #6F6555;
  font-size: 13px;
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-feed .martha-proposal-feedback:empty {
  display: none;
}

#quote-draft-surface .quote-form-grid,
#quote-draft-surface .quote-line-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

#quote-draft-surface .quote-draft-line {
  display: grid;
  gap: 10px;
  padding: 14px;
  margin: 10px 0;
  border: 1px solid var(--border, #e7e1d8);
  border-radius: 12px;
  background: var(--surface-soft, #fbfaf8);
}

#quote-draft-surface .quote-preview-lines {
  display: grid;
  gap: 8px;
  padding-left: 20px;
}

#quote-draft-surface .quote-preview-lines li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2px 12px;
}

#quote-draft-surface .quote-preview-lines small {
  grid-column: 1 / -1;
  color: var(--text-muted, #706b64);
}

#quote-draft-surface .quote-draft-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

#quote-draft-surface .quote-draft-actions span {
  color: var(--text-muted, #706b64);
  font-size: 0.9rem;
}

/* VISUEL-12 — les espaces secondaires reprennent la palette de la page
   Discussion. Les anciennes valeurs globales restaient sombres alors que
   quelques cartes étaient déjà claires : cela produisait du texte pâle sur
   ivoire et des blocs noirs dans le même écran. La portée exclut l’accueil,
   dont la maquette garde ses propres courbes et sa composition. */
html:has(body#martha-app.martha-design-system.martha-client-secondary) {
  color-scheme: light;
  background: #FBFAF7;
  scrollbar-color: #DCCFAF #FBFAF7;
}

html body#martha-app.martha-design-system.martha-client-secondary {
  color-scheme: light;
  --martha-ref-background: #FBFAF7;
  --martha-ref-foreground: #171717;
  --martha-ref-card: #FFFDF9;
  --martha-ref-popover: #FFFDF9;
  --martha-ref-elevated: #F7F1E7;
  --martha-ref-muted-foreground: #6F685D;
  --martha-ref-accent: #F8F0E2;
  --martha-ref-border: #E8DFCC;
  --martha-ref-input: #DCCFAF;
  --martha-ref-ring: #C8953B;
  --martha-ref-sidebar: #FFFDF9;
  --martha-ref-gold: #8A581A;
  --martha-ref-gold-bright: #C38321;
  --martha-ref-destructive: #A83228;

  /* Redefine the semantic tokens here, on the active theme scope. Defining
     only --martha-ref-* on this element left inherited design-system tokens
     resolved to their old dark values on descendant cards. */
  --martha-ds-bg: #FBFAF7;
  --martha-ds-bg-raised: #FFFDF9;
  --martha-ds-surface: #FFFDF9;
  --martha-ds-surface-raised: #F7F1E7;
  --martha-ds-surface-hover: #F8F0E2;
  --martha-ds-ink-strong: #171717;
  --martha-ds-ink: #29251F;
  --martha-ds-ink-soft: #8A581A;
  --martha-ds-muted: #6F685D;
  --martha-ds-faint: #81796D;
  --martha-ds-line: #E8DFCC;
  --martha-ds-line-strong: #D4BD91;
  --martha-ds-gold: #A86D1D;
  --martha-ds-gold-bright: #E8B84F;
  --martha-ds-gold-wash: rgba(232, 184, 79, .16);
  --martha-ds-green: #55713C;
  --martha-ds-green-wash: rgba(85, 113, 60, .12);
  --martha-ds-red: #A83228;
  --martha-ds-red-wash: rgba(168, 50, 40, .1);
  --martha-ds-blue: #496B8A;
  --martha-ds-blue-wash: rgba(73, 107, 138, .1);
  --martha-ds-focus: 0 0 0 3px rgba(200, 149, 59, .24);
  --martha-ds-shadow-sm: 0 8px 24px rgba(95, 69, 29, .06);
  --martha-ds-shadow-md: 0 18px 54px rgba(95, 69, 29, .09);

  --martha-client-bg: #FBFAF7;
  --martha-client-surface: #FFFDF9;
  --martha-client-surface-soft: #F7F1E7;
  --martha-client-line: #E8DFCC;
  --martha-client-line-soft: rgba(232, 223, 204, .82);
  --martha-client-text: #171717;
  --martha-client-muted: #6F685D;
  --martha-client-subtle: #81796D;
  --martha-client-gold: #8A581A;
  --martha-client-gold-light: #F4DA9E;
  --martha-client-gold-bright: #C38321;
  --martha-client-green: #55713C;
  --martha-cockpit-bg: #FBFAF7;
  --martha-cockpit-sidebar: #FFFDF9;
  --martha-cockpit-card: #FFFDF9;
  --martha-cockpit-card-2: #F7F1E7;
  --martha-cockpit-border: #E8DFCC;
  --martha-cockpit-border-soft: rgba(232, 223, 204, .82);
  --martha-cockpit-text: #171717;
  --martha-cockpit-muted: #6F685D;
  --martha-cockpit-gold: #8A581A;
  --martha-cockpit-gold-light: #F4DA9E;
  --martha-cockpit-green: #55713C;

  --bg: #FBFAF7;
  --surface: #FFFDF9;
  --surface-2: #F7F1E7;
  --surface-3: #F8F0E2;
  --line: #E8DFCC;
  --line-strong: #D4BD91;
  --muted: #6F685D;
  --text: #171717;
  --gold: #8A581A;
  --gold-bright: #C38321;
  --green: #55713C;
  --red: #A83228;
  --shadow: 0 18px 54px rgba(95, 69, 29, .09);
  color: #171717;
  background: #FBFAF7 !important;
}

html body#martha-app.martha-design-system.martha-client-secondary .app-shell,
html body#martha-app.martha-design-system.martha-client-secondary .app-shell > .main,
html body#martha-app.martha-design-system.martha-client-secondary .main,
html body#martha-app.martha-design-system.martha-client-secondary .view.active-view,
html body#martha-app.martha-design-system.martha-client-secondary .martha-guide-view {
  color: #171717;
  background: #FBFAF7 !important;
  background-image: none !important;
}

html body#martha-app.martha-design-system.martha-client-secondary .main {
  color: #171717;
}

html body#martha-app.martha-design-system.martha-client-secondary .martha-secondary-mobile-menu {
  border-color: #E8DFCC;
  color: #8A581A;
  background: #FFFDF9;
}

html body#martha-app.martha-design-system.martha-client-secondary .top-actions .ghost {
  border-color: #E8DFCC;
  color: #8A581A;
  background: #FFFDF9;
}

html body#martha-app.martha-design-system.martha-client-secondary :is(.section-heading h2, .hero h2, .panel h3, .panel h4, .panel-heading h3, .panel-heading h4, .martha-surface-heading h2) {
  color: #171717;
}

html body#martha-app.martha-design-system.martha-client-secondary :is(.muted, .event-meta, .field-hint, .form label, .eyebrow) {
  color: #6F685D;
}

html body#martha-app.martha-design-system.martha-client-secondary :is(.panel, .metric, .health-card, .agent-card, .roadmap-card, .martha-cockpit-card, .martha-page-orientation, .martha-client-context, .martha-guide-card, .activity-human-card, [class*="-card"], [class*="-panel"]) {
  border-color: #E8DFCC;
  color: #171717;
  background: #FFFDF9;
  box-shadow: 0 8px 24px rgba(95, 69, 29, .045);
}

html body#martha-app.martha-design-system.martha-client-secondary :is(.martha-surface > .section-heading, .martha-surface:not(#view-guide) > .section-heading, .martha-guide-hero, .martha-guide-intents, .martha-guide-boundary, .martha-guide-readiness, .martha-connector-launchpad) {
  border-color: #E8DFCC;
  color: #171717;
  background: linear-gradient(135deg, #FFFDF9, #F8F0E2);
  box-shadow: 0 8px 24px rgba(95, 69, 29, .045);
}

html body#martha-app.martha-design-system.martha-client-secondary :is(.event, .budget, .v2-row, .activity-human-card, [class*="-row"], [class*="-tile"]) {
  border-color: #E8DFCC;
  color: #171717;
  background: #FFFDF9;
}

html body#martha-app.martha-design-system.martha-client-secondary .main :is([class*="-record"], [class*="-entry"], [class*="-preview"], [class*="-quick-actions"]) {
  border-color: #E8DFCC;
  color: #171717;
  background: #FFFDF9;
  box-shadow: 0 6px 18px rgba(95, 69, 29, .04);
}

html body#martha-app.martha-design-system.martha-client-secondary :is(.martha-guide-card, .martha-guide-intent, .martha-guide-search, .martha-guide-clear, .martha-guide-secondary-action) {
  border-color: #E8DFCC;
  color: #29251F;
  background: #FFFDF9;
}

html body#martha-app.martha-design-system.martha-client-secondary :is(.martha-guide-card h3, .martha-guide-card strong, .martha-guide-intent strong, .martha-guide-readiness-copy h3, .activity-human-card h3, .activity-human-status, .event-title, .budget-title) {
  color: #171717;
}

html body#martha-app.martha-design-system.martha-client-secondary :is(.martha-guide-card p, .martha-guide-card li, .martha-guide-card summary, .martha-guide-intent small, .martha-guide-readiness-copy p, .martha-guide-readiness-copy small, .activity-human-card p, .activity-human-meta, .activity-human-audit, .activity-human-card details, .activity-human-kind) {
  color: #6F685D;
}

html body#martha-app.martha-design-system.martha-client-secondary :is(.martha-guide-toolbar, .activity-feed-toolbar, [class*="-toolbar"], [class*="-filters"]) {
  color: #29251F;
}

html body#martha-app.martha-design-system.martha-client-secondary :is(.martha-guide-primary, .martha-guide-prompt-action, .martha-guide-prompt-action:hover, .martha-guide-primary:hover, .martha-guide-primary:focus-visible) {
  border-color: #D9A84A;
  color: #54350C;
  background: linear-gradient(180deg, #FFF1C9, #E9B64F);
  box-shadow: 0 4px 12px rgba(178, 122, 25, .12);
}

html body#martha-app.martha-design-system.martha-client-secondary :is(.martha-guide-icon, .martha-guide-readiness-icon, .martha-guide-boundary-icon, .agent-icon) {
  border-color: #E8DFCC;
  color: #8A581A;
  background: #F8F0E2;
}

html body#martha-app.martha-design-system.martha-client-secondary :is(.pill.success, .badge.success, .status.success) {
  border-color: rgba(85, 113, 60, .24);
  color: #40582D;
  background: #EEF3E8;
}

html body#martha-app.martha-design-system.martha-client-secondary :is(.pill.warning, .badge.warning, .status.warning) {
  border-color: #E8D5AC;
  color: #75460F;
  background: #FBF1D9;
}

html body#martha-app.martha-design-system.martha-client-secondary :is(.pill.danger, .pill.error, .pill.critical, .badge.danger, .status.overdue, .error) {
  border-color: rgba(168, 50, 40, .2);
  color: #8F2A22;
  background: #FBEBE8;
}

html body#martha-app.martha-design-system.martha-client-secondary :is(input, select, textarea) {
  border-color: #DCCFAF;
  color: #171717;
  background: #FFFDF9;
}

html body#martha-app.martha-design-system.martha-client-secondary :is(input, textarea)::placeholder {
  color: #81796D;
  opacity: 1;
}

html body#martha-app.martha-design-system.martha-client-secondary :is(input[type="checkbox"], input[type="radio"]) {
  accent-color: #A86D1D;
}

html body#martha-app.martha-design-system.martha-client-secondary :is(button, a, input, select, textarea, summary):focus-visible {
  outline-color: #C8953B;
}

html body#martha-app.martha-design-system.martha-client-secondary .activity-human-actions {
  border-top-color: #E8DFCC;
}

html body#martha-app.martha-design-system.martha-client-secondary .activity-human-card.activity-health-healthy {
  border-left-color: #6E7F5C;
}

html body#martha-app.martha-design-system.martha-client-secondary .activity-human-card.activity-health-danger {
  border-left-color: #A83228;
}

html body#martha-app.martha-design-system.martha-client-secondary .list.empty {
  border-color: #E8DFCC;
  color: #6F685D;
  background: #F7F1E7;
}

html body#martha-app.martha-design-system.martha-client-secondary .list.empty::before {
  color: #8A581A;
}

html body#martha-app.martha-design-system.martha-client-secondary :is(dialog, .martha-more-drawer, .martha-command-results, .martha-action-menu, .martha-popover, .martha-context-menu) {
  border-color: #E8DFCC;
  color: #171717;
  background: #FFFDF9;
  box-shadow: 0 18px 54px rgba(95, 69, 29, .14);
}

html body#martha-app.martha-design-system.martha-client-secondary :is(dialog, .martha-more-drawer) :is(h1, h2, h3, h4, p, small, label, summary, span, strong) {
  color: inherit;
}

html body#martha-app.martha-design-system.martha-client-secondary dialog::backdrop {
  background: rgba(46, 36, 21, .34);
  backdrop-filter: blur(4px);
}

html body#martha-app.martha-design-system.martha-client-secondary :is(#view-catalogue, #view-stock, #view-manufacturing) > .section-heading {
  border: 1px solid #E8DFCC;
  border-radius: 22px;
  padding: 24px;
  background: linear-gradient(135deg, #FFFDF8 0%, #F5EEE0 100%);
  box-shadow: 0 8px 24px rgba(95, 69, 29, .045);
}

html body#martha-app.martha-design-system.martha-client-secondary :is(#view-catalogue, #view-stock, #view-manufacturing) :is(.section-heading h2, .panel-heading h3, .panel-heading h4) {
  color: #2A2420;
}

html body#martha-app.martha-design-system.martha-client-secondary :is(#view-catalogue, #view-stock, #view-manufacturing) .section-heading h2 {
  font-family: Fraunces, Georgia, 'Times New Roman', serif;
  font-size: clamp(28px, 3vw, 36px);
  font-weight: 500;
  letter-spacing: -.025em;
}

html body#martha-app.martha-design-system.martha-client-secondary :is(#view-catalogue, #view-stock, #view-manufacturing) :is(.panel, .product-catalog-toolbar, .product-catalog-detail, .martha-inventory-toolbar, .martha-manufacturing-toolbar, .martha-manufacturing-card) {
  border-color: #E8DFCC;
  border-radius: 20px;
  background: #FFFDF8;
  box-shadow: 0 8px 24px rgba(95, 69, 29, .045);
}

html body#martha-app.martha-design-system.martha-client-secondary :is(#view-catalogue, #view-stock, #view-manufacturing) :is(.product-catalog-detail-panel, .product-catalog-list-panel, .martha-inventory-balances-panel, .martha-inventory-forecast-panel, .martha-inventory-valuation-panel, .martha-traceability-panel) {
  padding: 20px;
}

html body#martha-app.martha-design-system.martha-client-secondary :is(#view-catalogue, #view-stock, #view-manufacturing) :is(.product-catalog-search, .martha-inventory-toolbar) {
  border-color: #E8DFCC;
  border-radius: 16px;
  background: #F8F2E8;
}

html body#martha-app.martha-design-system.martha-client-secondary :is(#view-catalogue, #view-stock, #view-manufacturing) :is(.primary, button.primary) {
  border-color: #D4A95A;
  border-radius: 999px;
  color: #3A2A16;
  background: linear-gradient(180deg, #F4DA9E, #E9C876);
  box-shadow: 0 4px 12px rgba(184, 134, 58, .16);
}

html body#martha-app.martha-design-system.martha-client-secondary :is(#view-catalogue, #view-stock, #view-manufacturing) :is(.ghost, .v2-action) {
  border-color: #E8DFCC;
  border-radius: 999px;
  color: #6B4A1B;
  background: #FFFDF8;
}

@media (max-width: 700px) {
  html body#martha-app.martha-design-system.martha-client-secondary :is(#view-catalogue, #view-stock, #view-manufacturing) > .section-heading { padding: 18px; }
  html body#martha-app.martha-design-system.martha-client-secondary :is(#view-catalogue, #view-stock, #view-manufacturing) :is(.panel, .product-catalog-detail, .martha-manufacturing-card) { border-radius: 18px; }
}

/* PAGES-METIER-01 — surfaces communes du shell secondaire. Le chat garde ses
   propres jetons; toute autre page partage le même fond crème et la même
   navigation ivoire. */
html body#martha-app.martha-design-system.martha-client-secondary {
  --martha-client-bg: #FAF6EE;
  --martha-client-line: #E8DFCC;
  --martha-client-line-soft: #EFE7D8;
  --martha-client-text: #2A2420;
  --martha-client-muted: #8A7F6E;
  --martha-ref-background: #FAF6EE;
  --martha-ref-foreground: #2A2420;
  --martha-ref-card: #FFFDF8;
  --martha-ref-popover: #FFFDF8;
  --martha-ref-elevated: #F5EEE0;
  --martha-ref-muted-foreground: #8A7F6E;
  --martha-ref-accent: #F5EEE0;
  --martha-ref-border: #E8DFCC;
  --martha-ref-input: #FFFDF8;
  --martha-ref-ring: #B8863A;
  background: #FAF6EE;
  color: #2A2420;
}

html body#martha-app.martha-design-system.martha-client-secondary .app-shell {
  border-color: #E8DFCC;
  background: #FAF6EE;
  box-shadow: 0 16px 48px rgba(95, 69, 29, .06);
}

html body#martha-app.martha-design-system.martha-client-secondary .app-shell > .sidebar {
  border-right-color: #E8DFCC;
  background: #FFFDF8;
}

html body#martha-app.martha-design-system.martha-client-secondary .main {
  background: radial-gradient(circle at 78% -10%, rgba(233, 200, 118, .18), transparent 38%), #FAF6EE;
}

html body#martha-app.martha-design-system.martha-client-secondary .topbar {
  border-bottom-color: #E8DFCC;
}

/* PAGES-METIER-01 — jetons de base de toutes les pages secondaires.
   La Discussion reste sur son thème dédié. Tous les modules hors chat
   héritent ici de la même palette; leurs finitions avancent par groupes. */
html body#martha-app.martha-design-system.martha-client-secondary {
  --martha-ds-ink-strong: #2A2420;
  --martha-ds-ink: #2A2420;
  --martha-ds-ink-soft: #8A5E21;
  --martha-ds-muted: #766D60;
  --martha-ds-faint: #8A7F6E;
  --martha-ds-bg: #FAF6EE;
  --martha-ds-bg-raised: #F5EEE0;
  --martha-ds-surface: #FFFDF8;
  --martha-ds-surface-raised: #FFFEFB;
  --martha-ds-surface-hover: #F8F0E2;
  --martha-ds-line: #E8DFCC;
  --martha-ds-line-strong: #DCCFAF;
  --martha-ds-gold: #B8863A;
  --martha-ds-gold-bright: #E9C876;
  --martha-ds-gold-wash: rgba(184, 134, 58, .12);
  --martha-ds-green: #52663D;
  --martha-ds-green-wash: #EEF3E8;
  --martha-ds-red: #963D34;
  --martha-ds-red-wash: #FBEBE8;
  --martha-ds-blue: #53697C;
  --martha-ds-blue-wash: #EEF3F7;
  --martha-ds-radius-sm: 10px;
  --martha-ds-radius-md: 16px;
  --martha-ds-radius-lg: 22px;
  --martha-ds-shadow-sm: 0 5px 16px rgba(95, 69, 29, .045);
  --martha-ds-shadow-md: 0 12px 32px rgba(95, 69, 29, .07);
  --martha-ds-focus: 0 0 0 3px rgba(184, 134, 58, .24);
  --bg: var(--martha-ds-bg);
  --surface: var(--martha-ds-surface);
  --surface-2: var(--martha-ds-surface-raised);
  --surface-3: var(--martha-ds-surface-hover);
  --line: var(--martha-ds-line);
  --line-strong: var(--martha-ds-line-strong);
  --muted: var(--martha-ds-muted);
  --gold: var(--martha-ds-gold);
  --gold-bright: var(--martha-ds-gold-bright);
  --green: var(--martha-ds-green);
  --red: var(--martha-ds-red);
  --shadow: var(--martha-ds-shadow-md);
}

html body#martha-app.martha-design-system.martha-client-secondary .main :is(.panel, .metric, .health-card, .agent-card, .roadmap-card, .martha-cockpit-card, .martha-page-orientation, .martha-client-context, .martha-guide-card, .activity-human-card, [class*="-card"], [class*="-panel"]) {
  border-radius: 20px;
}

html body#martha-app.martha-design-system.martha-client-secondary .main :is(.event, .budget, .v2-row, [class*="-row"], [class*="-tile"]) {
  border-radius: 16px;
}

html body#martha-app.martha-design-system.martha-client-secondary .main .martha-surface:not(#view-martha) > .section-heading h2 {
  color: #2A2420;
  font-family: Fraunces, Georgia, 'Times New Roman', serif;
  font-size: clamp(28px, 3vw, 36px);
  font-weight: 500;
  letter-spacing: -.025em;
}

html body#martha-app.martha-design-system.martha-client-secondary .main :is(.primary, button.primary) {
  border: 1px solid #D4A95A;
  border-radius: 999px;
  color: #3A2A16;
  background: linear-gradient(180deg, #F4DA9E, #E9C876);
  box-shadow: 0 4px 12px rgba(184, 134, 58, .16);
}

html body#martha-app.martha-design-system.martha-client-secondary .main :is(.ghost, .v2-action) {
  border-color: #E8DFCC;
  border-radius: 999px;
  color: #6B4A1B;
  background: #FFFDF8;
}

html body#martha-app.martha-design-system.martha-client-secondary .main .text-button {
  border-color: transparent;
  color: #8A5E21;
  background: transparent;
}

html body#martha-app.martha-design-system.martha-client-secondary .main .martha-module-back {
  border-color: #E8DFCC;
  border-radius: 999px;
  color: #6B4A1B;
  background: #FFFDF8;
}

/* PAGES-METIER-02 — Qualité et cycle de vie produit.
   Les deux vues gardent leurs parcours de revue et leurs champs propres;
   leurs tableaux, cartes de suivi et barres d’action reprennent les mêmes
   surfaces ivoire, bordures miel et rayons que le catalogue. */
html body#martha-app.martha-design-system.martha-client-secondary :is(#view-quality, #view-plm) > .section-heading {
  border: 1px solid #E8DFCC;
  border-radius: 22px;
  padding: 24px;
  background: linear-gradient(135deg, #FFFDF8 0%, #F5EEE0 100%);
  box-shadow: 0 8px 24px rgba(95, 69, 29, .045);
}

html body#martha-app.martha-design-system.martha-client-secondary :is(#view-quality, #view-plm) :is(.martha-quality-toolbar, .martha-plm-toolbar) {
  border-color: #E8DFCC;
  border-radius: 18px;
  background: #FFFDF8;
  box-shadow: 0 5px 16px rgba(95, 69, 29, .04);
}

html body#martha-app.martha-design-system.martha-client-secondary #view-quality :is(.martha-quality-kpi, .martha-quality-plan-card, .martha-quality-control-card, .martha-quality-nc-card, .martha-quality-audit-card, .martha-quality-action-row) {
  border-color: #E8DFCC;
  border-radius: 18px;
  color: #2A2420;
  background: #FFFDF8;
  box-shadow: 0 6px 18px rgba(95, 69, 29, .04);
}

html body#martha-app.martha-design-system.martha-client-secondary #view-quality .martha-quality-kpi strong {
  color: #8A5E21;
}

html body#martha-app.martha-design-system.martha-client-secondary #view-plm .martha-plm-change-card {
  border-color: #E8DFCC;
  border-radius: 20px;
  background: #FFFDF8;
  box-shadow: 0 6px 18px rgba(95, 69, 29, .04);
}

@media (max-width: 700px) {
  html body#martha-app.martha-design-system.martha-client-secondary :is(#view-quality, #view-plm) > .section-heading { padding: 18px; }
}

/* PAGES-METIER-03 — Commerce, Logistique, Maintenance, Opérations.
   Les quatre espaces relient l’activité commerciale aux mouvements et au
   suivi terrain; leurs indicateurs, barres d’action et fiches gardent la
   même hiérarchie visuelle que les pages de production. */
html body#martha-app.martha-design-system.martha-client-secondary :is(#view-commerce, #view-logistics, #view-maintenance, #view-operations) > .section-heading {
  border: 1px solid #E8DFCC;
  border-radius: 22px;
  padding: 24px;
  background: linear-gradient(135deg, #FFFDF8 0%, #F5EEE0 100%);
  box-shadow: 0 8px 24px rgba(95, 69, 29, .045);
}

html body#martha-app.martha-design-system.martha-client-secondary :is(#view-commerce, #view-logistics, #view-maintenance) :is(.martha-commerce-toolbar, .martha-logistics-toolbar, .martha-maintenance-toolbar, .martha-commerce-quick-actions, .martha-logistics-quick-actions, .martha-maintenance-quick-actions) {
  border-color: #E8DFCC;
  border-radius: 18px;
  background: #FFFDF8;
  box-shadow: 0 5px 16px rgba(95, 69, 29, .04);
}

html body#martha-app.martha-design-system.martha-client-secondary :is(#view-commerce, #view-logistics, #view-maintenance) :is(.martha-commerce-report > span, .martha-logistics-report > span, .martha-maintenance-report > span) {
  border-color: #E8DFCC;
  border-radius: 16px;
  background: #FFFEFB;
  box-shadow: 0 4px 12px rgba(95, 69, 29, .035);
}

html body#martha-app.martha-design-system.martha-client-secondary :is(#view-commerce, #view-logistics, #view-maintenance, #view-operations) :is(.martha-commerce-record, .martha-logistics-record, .martha-maintenance-record, .martha-logistics-customer-card, .martha-maintenance-depth) {
  border-color: #E8DFCC;
  border-radius: 18px;
  color: #2A2420;
  background: #FFFDF8;
  box-shadow: 0 6px 18px rgba(95, 69, 29, .04);
}

@media (max-width: 700px) {
  html body#martha-app.martha-design-system.martha-client-secondary :is(#view-commerce, #view-logistics, #view-maintenance, #view-operations) > .section-heading { padding: 18px; }
}

/* PAGES-METIER-04 — pilotage, finances, portefeuille et ventes. */
html body#martha-app.martha-design-system.martha-client-secondary :is(#view-overview, #view-portfolio, #view-orders, #view-budgets, #view-commercial, #view-analytics) :is(.hero, .section-heading) {
  border: 1px solid #E8DFCC;
  border-radius: 22px;
  background: linear-gradient(135deg, #FFFDF8 0%, #F5EEE0 100%);
  box-shadow: 0 8px 24px rgba(95, 69, 29, .045);
}

html body#martha-app.martha-design-system.martha-client-secondary #view-overview .hero {
  padding: clamp(22px, 3vw, 34px);
}

html body#martha-app.martha-design-system.martha-client-secondary #view-overview .hero h2 {
  color: #2A2420;
  font-family: Fraunces, Georgia, 'Times New Roman', serif;
  font-size: clamp(28px, 3vw, 38px);
  font-weight: 500;
  letter-spacing: -.025em;
}

html body#martha-app.martha-design-system.martha-client-secondary #view-overview :is(.metric, .count) {
  border-color: #E8DFCC;
  border-radius: 18px;
  background: #FFFDF8;
  box-shadow: 0 6px 18px rgba(95, 69, 29, .04);
}

html body#martha-app.martha-design-system.martha-client-secondary #view-overview .metric strong {
  color: #8A5E21;
}

html body#martha-app.martha-design-system.martha-client-secondary :is(#view-budgets, #view-commercial, #view-orders, #view-portfolio, #view-analytics) :is(.event, .budget, .v2-row, .client-record-list > *, #commercial-order-board > *, #portfolio-list > *, [class*="-record"], [class*="-tile"], [class*="-chart"], [class*="-report"]) {
  border-color: #E8DFCC;
  border-radius: 16px;
  color: #2A2420;
  background: #FFFDF8;
  box-shadow: 0 5px 16px rgba(95, 69, 29, .035);
}

html body#martha-app.martha-design-system.martha-client-secondary :is(#view-budgets, #view-commercial, #view-orders, #view-portfolio, #view-analytics) :is(.panel-heading h3, .panel-heading h4) {
  color: #2A2420;
  font-family: Fraunces, Georgia, 'Times New Roman', serif;
}

@media (max-width: 700px) {
  html body#martha-app.martha-design-system.martha-client-secondary :is(#view-overview, #view-portfolio, #view-orders, #view-budgets, #view-commercial, #view-analytics) :is(.hero, .section-heading) { border-radius: 18px; }
}

/* PAGES-METIER-05 — équipe, décisions, connaissances et développement. */
html body#martha-app.martha-design-system.martha-client-secondary :is(#view-agents, #view-decisions, #view-research, #view-memory, #view-venture) > .section-heading {
  border: 1px solid #E8DFCC;
  border-radius: 22px;
  padding: 24px;
  background: linear-gradient(135deg, #FFFDF8 0%, #F5EEE0 100%);
  box-shadow: 0 8px 24px rgba(95, 69, 29, .045);
}

html body#martha-app.martha-design-system.martha-client-secondary :is(#view-agents, #view-decisions, #view-research, #view-memory, #view-venture) :is(.agent-card, .activity-human-card, .memory-governance-item, .venture-detail-card, [data-venture-opportunity], [class*="-record"], [class*="-tile"]) {
  border-color: #E8DFCC;
  border-radius: 20px;
  color: #2A2420;
  background: #FFFDF8;
  box-shadow: 0 6px 18px rgba(95, 69, 29, .04);
}

html body#martha-app.martha-design-system.martha-client-secondary :is(#view-research, #view-memory) :is(.list:not(.empty) > *, .memory-source-details, .memory-source-details li) {
  border-color: #E8DFCC;
  border-radius: 16px;
  color: #2A2420;
  background: #FFFEFB;
}

html body#martha-app.martha-design-system.martha-client-secondary #view-venture .venture-detail-card {
  display: grid;
  gap: 8px;
  padding: 18px;
}

html body#martha-app.martha-design-system.martha-client-secondary #view-venture .venture-detail-card strong {
  color: #2A2420;
  font-family: Fraunces, Georgia, 'Times New Roman', serif;
  font-size: 20px;
  font-weight: 500;
}

html body#martha-app.martha-design-system.martha-client-secondary :is(#view-agents, #view-decisions, #view-research, #view-memory, #view-venture) .panel-heading h3 {
  color: #2A2420;
}

@media (max-width: 700px) {
  html body#martha-app.martha-design-system.martha-client-secondary :is(#view-agents, #view-decisions, #view-research, #view-memory, #view-venture) > .section-heading { padding: 18px; }
}

/* PAGES-METIER-06 — calendrier, automatisations, événements et guide. */
html body#martha-app.martha-design-system.martha-client-secondary :is(#view-scheduler, #view-automation, #view-events, #view-guide) :is(.section-heading, .martha-guide-hero, .martha-guide-intents) {
  border-color: #E8DFCC;
  border-radius: 22px;
  background: linear-gradient(135deg, #FFFDF8 0%, #F5EEE0 100%);
  box-shadow: 0 8px 24px rgba(95, 69, 29, .045);
}

html body#martha-app.martha-design-system.martha-client-secondary #view-scheduler :is(.martha-calendar-toolbar, .martha-calendar-day-detail, .martha-calendar-entry-list, .martha-calendar-create-details) {
  border-color: #E8DFCC;
  border-radius: 18px;
  background: #FFFDF8;
  box-shadow: 0 5px 16px rgba(95, 69, 29, .04);
}

html body#martha-app.martha-design-system.martha-client-secondary #view-scheduler .martha-calendar-day {
  border-color: #E8DFCC;
  border-radius: 14px;
  color: #2A2420;
  background: #FFFDF8;
}

html body#martha-app.martha-design-system.martha-client-secondary #view-automation :is(.automation-builder, .automation-step, .automation-test-result, .automation-create-panel) {
  border-color: #E8DFCC;
  border-radius: 18px;
  color: #2A2420;
  background: #FFFDF8;
  box-shadow: 0 5px 16px rgba(95, 69, 29, .04);
}

html body#martha-app.martha-design-system.martha-client-secondary #view-guide :is(.martha-guide-card, .martha-guide-readiness, .martha-guide-intent, .martha-guide-boundary) {
  border-color: #E8DFCC;
  border-radius: 20px;
  color: #2A2420;
  background: #FFFDF8;
  box-shadow: 0 6px 18px rgba(95, 69, 29, .04);
}

html body#martha-app.martha-design-system.martha-client-secondary #view-guide .martha-guide-hero h2 {
  color: #2A2420;
  font-family: Fraunces, Georgia, 'Times New Roman', serif;
  font-size: clamp(30px, 3.5vw, 42px);
  font-weight: 500;
  letter-spacing: -.025em;
}

html body#martha-app.martha-design-system.martha-client-secondary #view-events :is([class*="ext24-"][class*="card"], [class*="ext24-"][class*="panel"]) {
  border-color: #E8DFCC;
  border-radius: 20px;
  color: #2A2420;
  background: #FFFDF8;
  box-shadow: 0 6px 18px rgba(95, 69, 29, .04);
}

@media (max-width: 700px) {
  html body#martha-app.martha-design-system.martha-client-secondary :is(#view-scheduler, #view-automation, #view-events, #view-guide) :is(.section-heading, .martha-guide-hero, .martha-guide-intents) { border-radius: 18px; }
}

/* PAGES-METIER-08 — calendrier et automatisations. */
html body#martha-app.martha-design-system.martha-client-secondary #view-scheduler {
  --calendar-panel: #FFFDF8;
  --calendar-panel-soft: #F8F2E7;
  --calendar-line: #E8DFCC;
  --calendar-line-strong: #DCCFAF;
  --calendar-gold: #8A5E21;
  --calendar-gold-bright: #B8863A;
  --calendar-muted: #766D60;
  --calendar-text: #2A2420;
  --calendar-green: #52663D;
  --calendar-red: #963D34;
  --calendar-blue: #53697C;
}

html body#martha-app.martha-design-system.martha-client-secondary #view-scheduler #calendar-v2-surface {
  border: 1px solid #E8DFCC;
  border-radius: 22px;
  color: #2A2420;
  background: linear-gradient(145deg, #FFFDF8, #F8F2E7);
  box-shadow: 0 12px 32px rgba(95, 69, 29, .07);
}

html body#martha-app.martha-design-system.martha-client-secondary #view-scheduler #calendar-v2-surface :is(h2, h3, .martha-calendar-entry-title, .martha-calendar-day-head b, .martha-calendar-day-item, .martha-calendar-nav, .martha-calendar-view-label select, .martha-calendar-filter select) {
  color: #2A2420;
}

html body#martha-app.martha-design-system.martha-client-secondary #view-scheduler #calendar-v2-surface :is(.martha-calendar-heading .muted, .martha-calendar-detail-heading .muted, .martha-calendar-toolbar, .martha-calendar-filter, .martha-calendar-view-label, .martha-calendar-detail-hint, .martha-calendar-entry-kind, .martha-calendar-entry p) {
  color: #766D60;
}

html body#martha-app.martha-design-system.martha-client-secondary #view-scheduler #calendar-v2-surface :is(.martha-calendar-toolbar, .martha-calendar-day-detail, .martha-calendar-entry-list, .martha-calendar-create-details, .martha-calendar-view-label, .martha-calendar-filter) {
  border-color: #E8DFCC;
  border-radius: 16px;
  background: #FFFDF8;
  box-shadow: 0 5px 16px rgba(95, 69, 29, .04);
}

html body#martha-app.martha-design-system.martha-client-secondary #view-scheduler #calendar-v2-surface :is(.martha-calendar-nav, .martha-calendar-filter select) {
  border: 1px solid #E8DFCC;
  border-radius: 999px;
  color: #6B4A1B;
  background: #FFFDF8;
}

html body#martha-app.martha-design-system.martha-client-secondary #view-scheduler #calendar-v2-surface :is(.martha-calendar-nav:hover, .martha-calendar-nav:focus-visible, .martha-calendar-day:hover, .martha-calendar-day:focus-visible) {
  border-color: #DCCFAF;
  background: #F8F0E2;
  box-shadow: 0 5px 16px rgba(95, 69, 29, .08);
}

html body#martha-app.martha-design-system.martha-client-secondary #view-scheduler #calendar-v2-surface :is(.martha-calendar-day, .martha-calendar-entry) {
  border-color: #E8DFCC;
  border-radius: 14px;
  color: #2A2420;
  background: #FFFDF8;
}

html body#martha-app.martha-design-system.martha-client-secondary #view-scheduler #calendar-v2-surface .martha-calendar-day.is-selected {
  border-color: #B8863A;
  background: linear-gradient(145deg, #F8F0E2, #FFFDF8);
  box-shadow: inset 0 0 0 1px rgba(184, 134, 58, .18);
}

html body#martha-app.martha-design-system.martha-client-secondary #view-scheduler #calendar-v2-surface .martha-calendar-day.is-today .martha-calendar-day-head b {
  color: #3A2A16;
  background: #E9C876;
}

html body#martha-app.martha-design-system.martha-client-secondary #view-scheduler #calendar-v2-surface .martha-calendar-day-item {
  border-left-color: #B8863A;
  border-radius: 5px;
  background: #F5EEE0;
}

html body#martha-app.martha-design-system.martha-client-secondary #view-scheduler #calendar-v2-surface :is(.martha-calendar-entry-status, .martha-calendar-entry-priority) {
  color: #6B4A1B;
  background: #F5EEE0;
}

html body#martha-app.martha-design-system.martha-client-secondary #view-scheduler #calendar-v2-surface .martha-calendar-entry-action {
  color: #3A2A16;
  background: #E9C876;
}

html body#martha-app.martha-design-system.martha-client-secondary :is(#view-scheduler, #view-automation) .martha-secondary-details {
  margin: 16px 0;
  padding: 15px 18px;
  border: 1px solid #E8DFCC;
  border-radius: 18px;
  color: #2A2420;
  background: #FFFDF8;
  box-shadow: 0 5px 16px rgba(95, 69, 29, .04);
}

html body#martha-app.martha-design-system.martha-client-secondary :is(#view-scheduler, #view-automation) .martha-secondary-details > summary {
  color: #6B4A1B;
  cursor: pointer;
  font-weight: 700;
}

html body#martha-app.martha-design-system.martha-client-secondary #scheduler-center-surface .section-heading {
  margin-top: 14px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

html body#martha-app.martha-design-system.martha-client-secondary #scheduler-center-list .martha-scheduler-card {
  margin-top: 10px;
  padding: 14px;
  border: 1px solid #E8DFCC;
  border-radius: 14px;
  color: #2A2420;
  background: #FFFEFB;
}

html body#martha-app.martha-design-system.martha-client-secondary #view-automation .section-heading.martha-automation-heading {
  border: 1px solid #E8DFCC;
  border-radius: 22px;
  background: linear-gradient(135deg, #FFFDF8 0%, #F5EEE0 100%);
  box-shadow: 0 8px 24px rgba(95, 69, 29, .045);
}

html body#martha-app.martha-design-system.martha-client-secondary #view-automation .automation-history-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 16px 0;
}

html body#martha-app.martha-design-system.martha-client-secondary #view-automation .martha-automation-list-panel {
  min-width: 0;
  padding: 18px;
  border: 1px solid #E8DFCC;
  border-radius: 20px;
  color: #2A2420;
  background: #FFFDF8;
  box-shadow: 0 6px 18px rgba(95, 69, 29, .04);
}

html body#martha-app.martha-design-system.martha-client-secondary #view-automation .martha-automation-list-panel .panel-heading {
  align-items: flex-start;
  flex-direction: column;
  gap: 4px;
}

html body#martha-app.martha-design-system.martha-client-secondary #view-automation .martha-automation-list-panel .panel-heading p {
  margin: 0;
  color: #766D60;
}

html body#martha-app.martha-design-system.martha-client-secondary #view-automation .martha-automation-record {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
  padding: 14px;
  border: 1px solid #E8DFCC;
  border-radius: 14px;
  color: #2A2420;
  background: #FFFEFB;
}

html body#martha-app.martha-design-system.martha-client-secondary #view-automation .martha-automation-record .event-meta {
  color: #766D60;
  line-height: 1.5;
}

html body#martha-app.martha-design-system.martha-client-secondary #view-automation .automation-create-details .automation-create-panel {
  margin-top: 14px;
  padding: 18px;
  border: 1px solid #E8DFCC;
  border-radius: 18px;
  color: #2A2420;
  background: #FFFDF8;
  box-shadow: none;
}

html body#martha-app.martha-design-system.martha-client-secondary #view-automation :is(.automation-builder, .automation-step, .automation-test-result) {
  border-color: #E8DFCC;
  border-radius: 16px;
  color: #2A2420;
  background: #FFFDF8;
  box-shadow: 0 5px 16px rgba(95, 69, 29, .04);
}

html body#martha-app.martha-design-system.martha-client-secondary #view-automation .automation-step {
  display: grid;
  grid-template-columns: auto minmax(130px, .8fr) minmax(160px, 1fr) minmax(190px, 1.2fr);
  align-items: center;
  gap: 12px;
}

html body#martha-app.martha-design-system.martha-client-secondary #view-automation .automation-step-number {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid #DCCFAF;
  border-radius: 50%;
  color: #6B4A1B;
  background: #F5EEE0;
  font-weight: 700;
}

html body#martha-app.martha-design-system.martha-client-secondary #view-automation .automation-step :is(strong, small) {
  color: #2A2420;
}

html body#martha-app.martha-design-system.martha-client-secondary #view-automation .automation-step small {
  display: block;
  margin-top: 3px;
  color: #766D60;
}

html body#martha-app.martha-design-system.martha-client-secondary #view-automation .automation-step :is(input, select) {
  min-width: 0;
  min-height: 42px;
  padding: 9px 12px;
  border: 1px solid #E8DFCC;
  border-radius: 12px;
  color: #2A2420;
  background: #FFFDF8;
}

html body#martha-app.martha-design-system.martha-client-secondary #view-automation .automation-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

html body#martha-app.martha-design-system.martha-client-secondary :is(#view-scheduler, #view-automation) [hidden] {
  display: none !important;
}

@media (max-width: 760px) {
  html body#martha-app.martha-design-system.martha-client-secondary #view-automation .automation-history-grid {
    grid-template-columns: 1fr;
  }

  html body#martha-app.martha-design-system.martha-client-secondary #view-automation .automation-step {
    grid-template-columns: auto minmax(0, 1fr);
  }

  html body#martha-app.martha-design-system.martha-client-secondary #view-automation .automation-step :is(input, select) {
    grid-column: 1 / -1;
  }
}

/* PAGES-METIER-07 — capacités, modèles, exécutions, connecteurs et contrôle. */
html body#martha-app.martha-design-system.martha-client-secondary :is(#view-actions, #view-models, #view-execution, #view-connectors, #view-incidents, #view-governance) > .section-heading {
  border: 1px solid #E8DFCC;
  border-radius: 22px;
  padding: 24px;
  background: linear-gradient(135deg, #FFFDF8 0%, #F5EEE0 100%);
  box-shadow: 0 8px 24px rgba(95, 69, 29, .045);
}

html body#martha-app.martha-design-system.martha-client-secondary :is(#view-actions, #view-models, #view-execution, #view-connectors, #view-incidents, #view-governance) :is(.health-card, .action-card, .model-provider-card, .connector-card, .execution-card, [class*="-record"], [class*="-tile"]) {
  border-color: #E8DFCC;
  border-radius: 20px;
  color: #2A2420;
  background: #FFFDF8;
  box-shadow: 0 6px 18px rgba(95, 69, 29, .04);
}

/* PAGES-METIER-08 — présence web, portails, actifs et extensions. */
html body#martha-app.martha-design-system.martha-client-secondary :is(#view-site, #view-portals, #view-assets, #view-extensions) > .section-heading {
  border: 1px solid #E8DFCC;
  border-radius: 22px;
  padding: 24px;
  background: linear-gradient(135deg, #FFFDF8 0%, #F5EEE0 100%);
  box-shadow: 0 8px 24px rgba(95, 69, 29, .045);
}

html body#martha-app.martha-design-system.martha-client-secondary :is(#view-site, #view-portals, #view-assets, #view-extensions) :is(.ext20-site-grid, .ext20-list, [class*="ext22-"], [class*="asset-"], [class*="extension-"]) {
  border-color: #E8DFCC;
  color: #2A2420;
}

html body#martha-app.martha-design-system.martha-client-secondary :is(#view-site, #view-portals, #view-assets, #view-extensions) :is(.ext20-list li, [class*="ext22-"][class*="card"], [class*="asset-"][class*="card"], [class*="extension-"][class*="card"], [class*="-record"], [class*="-tile"]) {
  border: 1px solid #E8DFCC;
  border-radius: 18px;
  color: #2A2420;
  background: #FFFDF8;
  box-shadow: 0 5px 16px rgba(95, 69, 29, .04);
}

html body#martha-app.martha-design-system.martha-client-secondary :is(#view-site, #view-portals, #view-assets, #view-extensions) :is(.ext20-list li strong, .ext20-list li span, .ext20-list li small) {
  color: #2A2420;
  overflow-wrap: anywhere;
}

html body#martha-app.martha-design-system.martha-client-secondary :is(#view-site, #view-portals, #view-assets, #view-extensions) .panel-heading h3 {
  color: #2A2420;
  font-family: Fraunces, Georgia, 'Times New Roman', serif;
}

@media (max-width: 700px) {
  html body#martha-app.martha-design-system.martha-client-secondary :is(#view-site, #view-portals, #view-assets, #view-extensions) > .section-heading { padding: 18px; }
}

/* PAGES-METIER-09 — dernière passe d’uniformité des composants secondaires.
   Elle retire les nuances historiques de cartes et les boutons charbon
   restés en dur après VISUEL-12. Elle reste hors de view-martha. */
html body#martha-app.martha-design-system.martha-client-secondary .main :is(.panel, .metric, .health-card, .agent-card, .roadmap-card, .martha-cockpit-card, .martha-page-orientation, .martha-client-context, .martha-guide-card, .activity-human-card, [class*="-card"], [class*="-panel"]) {
  border-color: #E8DFCC;
  color: #2A2420;
  background: #FFFDF8;
  box-shadow: 0 7px 20px rgba(95, 69, 29, .045);
}

html body#martha-app.martha-design-system.martha-client-secondary .main :is(.event, .budget, .v2-row, [class*="-row"], [class*="-tile"]) {
  border-color: #E8DFCC;
  color: #2A2420;
  background: #FFFDF8;
}

html body#martha-app.martha-design-system.martha-client-secondary .main :is(.section-heading, .hero, .martha-guide-hero, .martha-guide-intents, .martha-guide-boundary, .martha-guide-readiness, .martha-connector-launchpad) {
  border-color: #E8DFCC;
  color: #2A2420;
  background: linear-gradient(135deg, #FFFDF8 0%, #F5EEE0 100%);
}

html body#martha-app.martha-design-system.martha-client-secondary .main :is(.section-heading h2, .hero h2, .panel-heading h3, .panel-heading h4, .martha-guide-intents h3) {
  color: #2A2420;
}

html body#martha-app.martha-design-system.martha-client-secondary .main :is(.muted, .event-meta, .field-hint, .form label, .eyebrow) {
  color: #766D60;
}

html body#martha-app.martha-design-system.martha-client-secondary .main :is(input, select, textarea) {
  border-color: #DCCFAF;
  color: #2A2420;
  background: #FFFDF8;
}

html body#martha-app.martha-design-system.martha-client-secondary .main :is(input, textarea)::placeholder {
  color: #817769;
  opacity: 1;
}

html body#martha-app.martha-design-system.martha-client-secondary .main .list.empty {
  border-color: #E8DFCC;
  color: #766D60;
  background: #F5EEE0;
}

html body#martha-app.martha-design-system.martha-client-secondary #view-overview {
  --martha-ref-background: #FAF6EE;
  --martha-ref-foreground: #2A2420;
  --martha-ref-card: #FFFDF8;
  --martha-ref-muted-foreground: #8A7F6E;
  --martha-ds-ink-strong: #2A2420;
  --martha-ds-ink-soft: #8A5E21;
  --martha-ds-gold-bright: #E9C876;
  background: #FAF6EE;
  color: #2A2420;
}

html body#martha-app.martha-design-system.martha-client-secondary #view-overview :is(.hero, .metric, .panel, .count) {
  border-color: #E8DFCC;
  border-radius: 20px;
  color: #2A2420;
  background: #FFFDF8;
}

html body#martha-app.martha-design-system.martha-client-secondary #view-overview .hero {
  background: linear-gradient(135deg, #FFFDF8 0%, #F5EEE0 100%);
}

html body#martha-app.martha-design-system.martha-client-secondary #view-overview :is(.hero h2, .panel h3, .event-title, .count) {
  color: #2A2420;
}

html body#martha-app.martha-design-system.martha-client-secondary #view-overview :is(.metric strong, .text-button) {
  color: #8A5E21;
}

html body#martha-app.martha-design-system.martha-client-secondary .main :is(.ghost, .v2-action, .martha-module-back) {
  border-color: #E8DFCC;
  border-radius: 999px;
  color: #6B4A1B;
  background: #FFFDF8;
}

@media (max-width: 700px) {
  html body#martha-app.martha-design-system.martha-client-secondary .main :is(.panel, .metric, .health-card, [class*="-card"], [class*="-panel"]) { border-radius: 18px; }
}

/* VISUEL-AUDIT-01 — source unique pour les composants partagés des pages métier.
   Le thème sombre historique reste isolé du chat pendant sa refonte dédiée. */
html body#martha-app.martha-design-system.martha-client-secondary {
  color-scheme: light;
  --martha-ref-background: #FAF6EE;
  --martha-ref-foreground: #2A2420;
  --martha-ref-card: #FFFDF8;
  --martha-ref-popover: #FFFDF8;
  --martha-ref-elevated: #FFFDF8;
  --martha-ref-muted-foreground: #8A7F6E;
  --martha-ref-accent: #F8F0E2;
  --martha-ref-border: #E8DFCC;
  --martha-ref-input: #DCCFAF;
  --martha-ref-ring: rgba(184, 134, 58, .42);
  --martha-ref-sidebar: #FAF6EE;
  --martha-ref-gold: #B8863A;
  --martha-ref-gold-bright: #E9C876;
  --martha-ds-ink-strong: #2A2420;
  --martha-ds-ink: #2A2420;
  --martha-ds-ink-soft: #6F5C43;
  --martha-ds-muted: #8A7F6E;
  --martha-ds-faint: #8A7F6E;
  --martha-ds-bg: #FAF6EE;
  --martha-ds-bg-raised: #FFFDF8;
  --martha-ds-surface: #FFFDF8;
  --martha-ds-surface-raised: #FFFDF8;
  --martha-ds-surface-hover: #F8F0E2;
  --martha-ds-line: #E8DFCC;
  --martha-ds-line-strong: #D9A84A;
  --martha-ds-gold: #B8863A;
  --martha-ds-gold-bright: #F4DA9E;
  --martha-ds-gold-wash: rgba(244, 218, 158, .3);
  --martha-ds-green: #55713C;
  --martha-ds-green-wash: rgba(85, 113, 60, .12);
  --martha-ds-red: #8F2A22;
  --martha-ds-red-wash: rgba(143, 42, 34, .1);
  --martha-ds-blue: #725324;
  --martha-ds-blue-wash: rgba(184, 134, 58, .1);
  --martha-ds-radius-sm: 12px;
  --martha-ds-radius-md: 20px;
  --martha-ds-radius-lg: 22px;
  --martha-ds-shadow-sm: 0 8px 24px rgba(80, 55, 18, .06);
  --martha-ds-shadow-md: 0 16px 40px rgba(80, 55, 18, .1);
  --martha-ds-focus: 0 0 0 3px rgba(184, 134, 58, .2);
  --bg: #FAF6EE;
  --surface: #FFFDF8;
  --surface-2: #FFFDF8;
  --surface-3: #F8F0E2;
  --line: #E8DFCC;
  --line-strong: #D9A84A;
  --muted: #8A7F6E;
  --gold: #B8863A;
  --gold-bright: #E9C876;
  --green: #55713C;
  --red: #8F2A22;
  --shadow: 0 16px 40px rgba(80, 55, 18, .1);
  background: #FAF6EE !important;
  color: #2A2420;
}

html body#martha-app.martha-design-system :is(.martha-secondary-new, .martha-client-new-discussion, .martha-empty-action) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 46px;
  padding: 10px 16px;
  border: 1px solid #D9A84A !important;
  border-radius: 999px;
  color: #54350C !important;
  background: linear-gradient(180deg, #FFF1C9, #E9B64F) !important;
  box-shadow: 0 5px 14px rgba(140, 99, 34, .12);
  font-size: 14px;
  font-weight: 600;
}

html body#martha-app.martha-design-system :is(.martha-secondary-new, .martha-client-new-discussion, .martha-empty-action):hover,
html body#martha-app.martha-design-system :is(.martha-secondary-new, .martha-client-new-discussion, .martha-empty-action):focus-visible {
  border-color: #B8863A !important;
  color: #54350C !important;
  background: linear-gradient(180deg, #FFF5D9, #F4DA9E) !important;
  transform: translateY(-1px);
}

html body#martha-app.martha-design-system :is(.martha-secondary-nav .nav-item, .martha-cockpit-nav-list .martha-cockpit-nav) {
  min-height: 42px;
  gap: 10px;
  border: 1px solid transparent !important;
  border-radius: 14px;
  color: #6F685D;
  background: transparent !important;
}

html body#martha-app.martha-design-system :is(.martha-secondary-nav .nav-item, .martha-cockpit-nav-list .martha-cockpit-nav):hover {
  color: #2A2420 !important;
  background: #F8F0E2 !important;
}

html body#martha-app.martha-design-system :is(.martha-secondary-nav .nav-item.active, .martha-cockpit-nav-list .martha-cockpit-nav.active) {
  border-color: #E8DFCC !important;
  color: #54350C !important;
  background: linear-gradient(100deg, #FFF1C9, #FFFDF8) !important;
  box-shadow: 0 3px 10px rgba(140, 99, 34, .07) !important;
  font-weight: 600;
}

html body#martha-app.martha-design-system :is(.static-nav-icon, .martha-chat-nav-icon) {
  display: grid;
  flex: 0 0 28px;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid #E8DFCC !important;
  border-radius: 10px;
  color: #8A581A !important;
  background: #F8F0E2 !important;
}

html body#martha-app.martha-design-system :is(.static-nav-svg, .martha-chat-nav-icon svg) {
  width: 16px;
  height: 16px;
}

html body#martha-app.martha-design-system :is(.martha-secondary-nav .nav-item.active, .martha-cockpit-nav-list .martha-cockpit-nav.active)::after {
  color: #B8863A;
  content: '›';
  font-size: 19px;
  margin-left: auto;
}

/* VISUEL-04 — une seule grammaire légère pour les menus, sur chaque écran. */
html body#martha-app.martha-design-system :is(.martha-secondary-nav .nav-item, .martha-cockpit-nav-list .martha-cockpit-nav) {
  min-height: 36px;
  height: auto;
  margin: 0 0 2px;
  padding: 7px 10px;
  gap: 9px;
  border: 1px solid transparent !important;
  border-radius: 5px;
  color: #71685b !important;
  background: transparent !important;
  box-shadow: none !important;
  font-size: 13px;
  font-weight: 400;
  line-height: 20px;
  text-align: left;
}

html body#martha-app.martha-design-system :is(.martha-secondary-nav .nav-item:hover, .martha-cockpit-nav-list .martha-cockpit-nav:hover),
html body#martha-app.martha-design-system :is(.martha-secondary-nav .nav-item:focus-visible, .martha-cockpit-nav-list .martha-cockpit-nav:focus-visible) {
  color: #392f21 !important;
  background: #F5EFE3 !important;
}

html body#martha-app.martha-design-system :is(.martha-secondary-nav .nav-item.active, .martha-cockpit-nav-list .martha-cockpit-nav.active) {
  border-color: transparent !important;
  color: #54350C !important;
  background: #F5EFE3 !important;
  box-shadow: inset 2px 0 #C89A4A !important;
  font-weight: 550;
}

html body#martha-app.martha-design-system :is(.martha-secondary-nav .static-nav-icon, .martha-cockpit-nav-list .martha-chat-nav-icon) {
  display: grid;
  flex: 0 0 18px;
  place-items: center;
  width: 18px;
  height: 18px;
  padding: 0;
  border: 0 !important;
  border-radius: 0;
  color: #9B7B49 !important;
  background: transparent !important;
  box-shadow: none !important;
}

html body#martha-app.martha-design-system :is(.martha-secondary-nav .static-nav-icon svg, .martha-cockpit-nav-list .martha-chat-nav-icon svg) {
  width: 17px;
  height: 17px;
}

html body#martha-app.martha-design-system :is(.martha-secondary-nav .nav-item.active, .martha-cockpit-nav-list .martha-cockpit-nav.active)::after {
  display: none !important;
  content: none !important;
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-sidebar .martha-cockpit-nav-list .martha-cockpit-nav {
  min-height: 36px !important;
  margin: 0 0 2px !important;
  padding: 7px 10px !important;
  gap: 9px !important;
  border-radius: 5px !important;
  font-size: 13px !important;
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-sidebar .martha-cockpit-nav-list .martha-cockpit-nav.active {
  border: 1px solid transparent !important;
  color: #54350C !important;
  background: #F5EFE3 !important;
  box-shadow: inset 2px 0 #C89A4A !important;
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-sidebar .martha-cockpit-nav-list .martha-cockpit-nav.active::after {
  display: none !important;
  content: none !important;
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-sidebar .martha-cockpit-nav .martha-chat-nav-icon,
html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-sidebar .martha-cockpit-nav .martha-chat-nav-icon svg {
  flex: 0 0 18px !important;
  width: 18px !important;
  height: 18px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}


@media (max-width: 760px) {
  html body#martha-app.martha-design-system :is(.martha-secondary-nav .nav-item, .martha-cockpit-nav-list .martha-cockpit-nav),
  html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-sidebar .martha-cockpit-nav-list .martha-cockpit-nav {
    min-height: 40px !important;
    padding-top: 8px !important;
    padding-bottom: 8px !important;
  }
}

html body#martha-app.martha-design-system.martha-client-secondary .main :is(.primary, .martha-dialog-primary, .martha-guide-primary, .martha-guide-prompt-action) {
  min-height: 42px;
  padding: 9px 16px;
  border: 1px solid #D9A84A !important;
  border-radius: 999px;
  color: #54350C !important;
  background: linear-gradient(180deg, #FFF1C9, #E9B64F) !important;
  box-shadow: 0 4px 12px rgba(178, 122, 25, .12);
  font-weight: 600;
}

html body#martha-app.martha-design-system.martha-client-secondary .main :is(.ghost, .text-button, .martha-dialog-secondary, .martha-guide-action, .martha-guide-secondary-action, .martha-module-back) {
  min-height: 38px;
  padding: 8px 13px;
  border: 1px solid #E8DFCC !important;
  border-radius: 999px;
  color: #6B4A1B !important;
  background: #FFFDF8 !important;
  box-shadow: none;
  font-size: 13px;
  font-weight: 500;
}

html body#martha-app.martha-design-system.martha-client-secondary .main :is(.ghost, .text-button, .martha-dialog-secondary, .martha-guide-action, .martha-guide-secondary-action, .martha-module-back):hover {
  border-color: #D9A84A !important;
  color: #54350C !important;
  background: #F8F0E2 !important;
}

html body#martha-app.martha-design-system.martha-client-secondary #view-guide .martha-prompt-library {
  border-color: #E8DFCC;
  border-radius: 22px;
  color: #2A2420;
  background: linear-gradient(135deg, #FFFDF8, #F5EEE0) !important;
  box-shadow: 0 8px 24px rgba(80, 55, 18, .06);
}

html body#martha-app.martha-design-system.martha-client-secondary #view-guide .martha-prompt-library :is(h3, h4, strong, .martha-prompt-id) {
  color: #2A2420;
}

html body#martha-app.martha-design-system.martha-client-secondary #view-guide .martha-prompt-library :is(p, small, .martha-prompt-category, .martha-prompt-count, .martha-prompt-library-heading p) {
  color: #766D60;
}

html body#martha-app.martha-design-system.martha-client-secondary #view-guide .martha-prompt-library-total {
  border-color: #E8DFCC;
  color: #75460F;
  background: #FBF1D9;
}

html body#martha-app.martha-design-system.martha-client-secondary #view-guide :is(.martha-prompt-search, .martha-prompt-category-filter) {
  border-color: #DCCFAF;
  border-radius: 999px;
  color: #6F685D;
  background: #FFFDF8 !important;
}

html body#martha-app.martha-design-system.martha-client-secondary #view-guide :is(.martha-prompt-search input, .martha-prompt-category-filter select) {
  border: 0;
  color: #2A2420;
  background: transparent !important;
}

html body#martha-app.martha-design-system.martha-client-secondary #view-guide .martha-prompt-card {
  border-color: #E8DFCC;
  border-radius: 18px;
  color: #2A2420;
  background: #FFFDF8 !important;
  box-shadow: 0 5px 16px rgba(80, 55, 18, .045);
}

html body#martha-app.martha-design-system.martha-client-secondary #view-guide .martha-prompt-card:hover,
html body#martha-app.martha-design-system.martha-client-secondary #view-guide .martha-prompt-card:focus-within {
  border-color: #D9A84A;
  background: #FFFDF8 !important;
}

html body#martha-app.martha-design-system.martha-client-secondary #view-guide .martha-prompt-card-meta {
  border-top-color: #E8DFCC;
}

html body#martha-app.martha-design-system.martha-client-secondary .main .martha-page-disclosure {
  min-width: 0;
  border: 1px solid #E8DFCC;
  border-radius: 18px;
  color: #2A2420;
  background: #FFFDF8;
  box-shadow: 0 5px 16px rgba(80, 55, 18, .045);
}

html body#martha-app.martha-design-system.martha-client-secondary .main .martha-page-disclosure > summary {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  color: #6B4A1B;
  cursor: pointer;
  font-weight: 600;
  list-style: none;
}

html body#martha-app.martha-design-system.martha-client-secondary .main .martha-page-disclosure > summary::-webkit-details-marker {
  display: none;
}

html body#martha-app.martha-design-system.martha-client-secondary .main .martha-page-disclosure > summary::after {
  color: #B8863A;
  content: '+';
  font-size: 20px;
  font-weight: 400;
}

html body#martha-app.martha-design-system.martha-client-secondary .main .martha-page-disclosure[open] > summary::after {
  content: '−';
}

html body#martha-app.martha-design-system.martha-client-secondary .main .martha-page-disclosure > :not(summary) {
  margin: 0 14px 14px;
}

html body#martha-app.martha-design-system.martha-client-secondary #view-catalogue .product-catalog-workspace > .martha-page-disclosure {
  align-self: start;
}

html body#martha-app.martha-design-system.martha-client-secondary #view-catalogue .product-catalog-workspace > .martha-page-disclosure > .panel {
  border: 0;
  box-shadow: none;
}

html body#martha-app.martha-design-system.martha-client-secondary #view-catalogue .product-catalog-import-disclosure {
  margin-top: 16px;
}

html body#martha-app.martha-design-system.martha-client-secondary #view-catalogue .product-catalog-detail-actions > .martha-page-disclosure {
  margin-top: 12px;
}

html body#martha-app.martha-design-system.martha-client-secondary #view-stock .martha-inventory-workspace > .martha-inventory-movement-primary {
  grid-column: 1 / -1;
  border-color: #D9A84A;
}

html body#martha-app.martha-design-system.martha-client-secondary #view-stock .martha-page-disclosure > .panel {
  border: 0;
  background: transparent;
  box-shadow: none;
}

html body#martha-app.martha-design-system.martha-client-secondary #view-stock .martha-inventory-controls > .martha-page-disclosure {
  align-self: start;
}

html body#martha-app.martha-design-system.martha-client-secondary #view-stock .martha-inventory-balances-panel {
  border-color: #E8DFCC;
  background: linear-gradient(135deg, #FFFDF8, #F5EEE0);
}

html body#martha-app.martha-design-system.martha-client-secondary #view-stock .martha-inventory-movement-primary .panel-heading h3 {
  color: #75460F;
}

/* PAGES-METIER — Commerce, Logistique et Maintenance : les étapes avancées
   restent repliées dans leur carte parente, sans empiler plusieurs cartes. */
html body#martha-app.martha-design-system.martha-client-secondary :is(#view-commerce, #view-logistics, #view-maintenance) .panel > .martha-page-disclosure {
  margin-top: 14px;
  border-color: #E8DFCC;
  border-radius: 14px;
  background: #FFFEFB;
  box-shadow: none;
}

html body#martha-app.martha-design-system.martha-client-secondary :is(#view-commerce, #view-logistics, #view-maintenance) .panel > .martha-page-disclosure > summary {
  min-height: 44px;
  padding: 10px 12px;
  color: #75460F;
  font-size: 14px;
}

html body#martha-app.martha-design-system.martha-client-secondary #view-maintenance .martha-maintenance-access-note {
  margin: 14px 0;
  padding: 14px 16px;
  border: 1px solid #E8D4A5;
  border-left: 4px solid #B8863A;
  border-radius: 14px;
  color: #5B482B;
  background: #FBF3DF;
  line-height: 1.55;
}

html body#martha-app.martha-design-system.martha-client-secondary #view-logistics .martha-logistics-proof-note {
  margin: 10px 14px 14px;
  padding: 12px 14px;
  border: 1px solid #E8D4A5;
  border-radius: 12px;
  color: #5B482B;
  background: #FBF3DF;
  font-size: 13px;
  line-height: 1.5;
}

html body#martha-app.martha-design-system.martha-client-secondary #view-manufacturing .martha-manufacturing-order-card {
  border-color: #E8DFCC;
  border-radius: 20px;
  background: #FFFDF8;
  box-shadow: 0 6px 18px rgba(80, 55, 18, .06);
}

html body#martha-app.martha-design-system.martha-client-secondary #view-manufacturing .martha-manufacturing-action-disclosure > summary {
  color: #54350C;
  background: linear-gradient(100deg, #FFF1C9, #FFFDF8);
}

html body#martha-app.martha-design-system.martha-client-secondary #view-manufacturing .martha-manufacturing-order-actions [data-manufacturing-order-action] {
  min-height: 40px;
  padding: 8px 16px;
  border: 1px solid #D9A84A !important;
  border-radius: 999px;
  color: #54350C !important;
  background: linear-gradient(180deg, #FFF1C9, #E9B64F) !important;
  font-weight: 600;
}

html body#martha-app.martha-design-system.martha-client-secondary #view-manufacturing .martha-manufacturing-scope-note {
  padding: 12px 16px;
  border: 1px solid #E8DFCC;
  border-radius: 14px;
  color: #6B4A1B;
  background: #FBF1D9;
}

html body#martha-app.martha-design-system.martha-client-secondary #view-quality .martha-quality-priority-panel {
  border-color: #D9A84A;
  background: linear-gradient(135deg, #FFFDF8, #FBF1D9);
}

html body#martha-app.martha-design-system.martha-client-secondary #view-quality .martha-quality-check-editor,
html body#martha-app.martha-design-system.martha-client-secondary #view-plm .martha-plm-impact-editor {
  display: grid;
  gap: 12px;
  min-width: 0;
}

html body#martha-app.martha-design-system.martha-client-secondary #view-quality .martha-quality-risk-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin: 0;
  padding: 12px 14px;
  border: 1px solid #E8DFCC;
  border-radius: 14px;
  color: #54350C;
  background: #FFFDF8;
}

html body#martha-app.martha-design-system.martha-client-secondary #view-quality .martha-quality-risk-options legend {
  padding: 0 4px;
  color: #75460F;
  font-weight: 600;
}

html body#martha-app.martha-design-system.martha-client-secondary #view-quality .martha-quality-risk-options label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0;
}

html body#martha-app.martha-design-system.martha-client-secondary #view-quality .martha-quality-risk-options input {
  width: auto;
  margin: 0;
}

html body#martha-app.martha-design-system.martha-client-secondary #view-quality [data-quality-check-builder],
html body#martha-app.martha-design-system.martha-client-secondary #view-plm [data-plm-impact-builder] {
  display: grid;
  gap: 12px;
}

html body#martha-app.martha-design-system.martha-client-secondary #view-quality .martha-quality-check-row,
html body#martha-app.martha-design-system.martha-client-secondary #view-plm .martha-plm-impact-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  min-width: 0;
  padding: 14px;
  border: 1px solid #E8DFCC;
  border-radius: 16px;
  background: #FFFDF8;
}

html body#martha-app.martha-design-system.martha-client-secondary #view-quality .martha-quality-check-row > label,
html body#martha-app.martha-design-system.martha-client-secondary #view-plm .martha-plm-impact-row > label {
  display: grid;
  align-content: start;
  gap: 6px;
  min-width: 0;
}

html body#martha-app.martha-design-system.martha-client-secondary #view-quality .martha-quality-measure-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

html body#martha-app.martha-design-system.martha-client-secondary #view-quality .martha-quality-measure-fields[hidden] {
  display: none;
}

html body#martha-app.martha-design-system.martha-client-secondary #view-quality .martha-quality-check-row .martha-quality-check {
  display: flex;
  align-items: center;
  grid-column: 1 / -1;
}

html body#martha-app.martha-design-system.martha-client-secondary #view-quality .martha-quality-check-row [data-quality-check-remove],
html body#martha-app.martha-design-system.martha-client-secondary #view-plm .martha-plm-impact-row [data-plm-impact-remove] {
  justify-self: start;
  color: #75460F;
}

html body#martha-app.martha-design-system.martha-client-secondary #view-plm .martha-plm-impact-editor > strong {
  color: #54350C;
  font-family: Fraunces, Georgia, serif;
  font-size: 1.15rem;
}

html body#martha-app.martha-design-system.martha-client-secondary #view-plm .martha-plm-card-details {
  margin-top: 8px;
}

html body#martha-app.martha-design-system.martha-client-secondary #view-quality .martha-quality-plan-register,
html body#martha-app.martha-design-system.martha-client-secondary #view-quality .martha-quality-action-list {
  min-width: 0;
}

@media (max-width: 720px) {
  html body#martha-app.martha-design-system.martha-client-secondary #view-quality .martha-quality-check-row,
  html body#martha-app.martha-design-system.martha-client-secondary #view-plm .martha-plm-impact-row,
  html body#martha-app.martha-design-system.martha-client-secondary #view-quality .martha-quality-measure-fields {
    grid-template-columns: 1fr;
  }
}

html body#martha-app.martha-design-system.martha-client-secondary #view-operations .martha-operation-navigation {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 24px;
  padding: 12px;
  border: 1px solid var(--martha-ds-line);
  border-radius: var(--martha-ds-radius-md);
  background: var(--martha-ds-surface);
  box-shadow: var(--martha-ds-shadow-sm);
}

html body#martha-app.martha-design-system.martha-client-secondary #view-operations .martha-operation-navigation button {
  min-height: 40px;
  padding: 8px 14px;
  border: 1px solid var(--martha-ds-line);
  border-radius: 999px;
  color: var(--martha-ds-ink-soft);
  background: var(--martha-ds-surface);
  font-weight: 600;
}

html body#martha-app.martha-design-system.martha-client-secondary #view-operations .martha-operation-navigation button:hover,
html body#martha-app.martha-design-system.martha-client-secondary #view-operations .martha-operation-navigation button:focus-visible {
  border-color: var(--martha-ds-line-strong);
  color: #54350C;
  background: #FBF1D9;
  box-shadow: var(--martha-ds-focus);
}

html body#martha-app.martha-design-system.martha-client-secondary #view-operations .martha-operation-group {
  scroll-margin-top: 24px;
  display: grid;
  gap: 14px;
  margin: 22px 0 30px;
  padding: 18px;
  border: 1px solid var(--martha-ds-line);
  border-radius: var(--martha-ds-radius-lg);
  background: linear-gradient(145deg, var(--martha-ds-surface), #F8F2E7);
  box-shadow: var(--martha-ds-shadow-sm);
}

html body#martha-app.martha-design-system.martha-client-secondary #view-operations .martha-operation-group-hint {
  margin: 0;
  color: var(--martha-ds-ink-soft);
  font-family: Fraunces, Georgia, serif;
  font-size: 1.16rem;
}

html body#martha-app.martha-design-system.martha-client-secondary #view-operations .martha-operation-group > :is(.section-heading, #workforce-control-surface, #human-work-surface, .two-columns) {
  margin-top: 0 !important;
}

html body#martha-app.martha-design-system.martha-client-secondary #view-operations .martha-page-disclosure {
  margin-top: 10px;
  padding: 10px 14px;
  border: 1px solid var(--martha-ds-line);
  border-radius: 14px;
  background: var(--martha-ds-surface);
}

html body#martha-app.martha-design-system.martha-client-secondary #view-operations .martha-page-disclosure > summary {
  color: #6B4A1B;
  font-weight: 600;
}

html body#martha-app.martha-design-system.martha-client-secondary #view-operations .martha-operation-readiness-note {
  margin: 12px 0;
  padding: 12px 14px;
  border: 1px solid var(--martha-ds-line-strong);
  border-radius: 14px;
  color: #54350C;
  background: #FBF1D9;
  line-height: 1.5;
}

/* Clients & ventes — onglets lisibles, états regroupés et pastilles d’icône. */
html body#martha-app.martha-design-system.martha-client-secondary #view-commercial {
  --martha-ref-background: #FBFAF7;
  --martha-ref-foreground: #171717;
  --martha-ref-card: #FFFDF9;
  --martha-ref-muted-foreground: #746E64;
  --martha-ref-border: #E8DFCC;
  --martha-ds-ink-strong: #171717;
  --martha-ds-ink-soft: #6B4A1B;
  --martha-ds-line: #E8DFCC;
  --martha-ds-line-strong: #D9A84A;
  background: #FBFAF7 !important;
  color: #171717;
}

html body#martha-app.martha-design-system.martha-client-secondary #view-commercial .martha-client-subnavigation {
  display: flex;
  flex-wrap: nowrap;
  gap: 7px;
  margin: 0 0 20px;
  padding: 7px;
  overflow-x: auto;
  border: 1px solid #E8DFCC;
  border-radius: 18px;
  background: #FFFDF9;
  box-shadow: 0 5px 18px rgba(104, 78, 34, .06);
  scrollbar-width: thin;
}

html body#martha-app.martha-design-system.martha-client-secondary #view-commercial .martha-client-subnavigation button {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 6px 14px 6px 7px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: #746E64;
  background: transparent;
  font-size: 13px;
  font-weight: 550;
  white-space: nowrap;
}

html body#martha-app.martha-design-system.martha-client-secondary #view-commercial .commercial-tab-icon {
  display: grid;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid #E8DFCC;
  border-radius: 50%;
  color: #8A581A;
  background: #F8F0E2;
}

html body#martha-app.martha-design-system.martha-client-secondary #view-commercial .commercial-tab-svg {
  width: 15px;
  height: 15px;
}

html body#martha-app.martha-design-system.martha-client-secondary #view-commercial .martha-client-subnavigation button:hover,
html body#martha-app.martha-design-system.martha-client-secondary #view-commercial .martha-client-subnavigation button:focus-visible {
  border-color: #E8DFCC;
  color: #54350C;
  background: #FBF6EB;
  outline: none;
}

html body#martha-app.martha-design-system.martha-client-secondary #view-commercial .martha-client-subnavigation button.active {
  border-color: #D9A84A;
  color: #54350C;
  background: linear-gradient(180deg, #FFF1C9, #F4DA9E);
  box-shadow: 0 3px 10px rgba(140, 99, 34, .09);
  font-weight: 650;
}

html body#martha-app.martha-design-system.martha-client-secondary #view-commercial .martha-client-subnavigation button.active .commercial-tab-icon {
  border-color: rgba(184, 134, 58, .3);
  background: rgba(255, 253, 248, .76);
}

html body#martha-app.martha-design-system.martha-client-secondary #view-commercial .client-governance-details {
  margin-top: 14px;
  padding: 13px 16px;
  border: 1px solid #E8DFCC;
  border-radius: 16px;
  background: #FFFDF9;
}

html body#martha-app.martha-design-system.martha-client-secondary #view-commercial .client-governance-details > summary {
  color: #6B4A1B;
  font-weight: 600;
}

@media (max-width: 720px) {
  html body#martha-app.martha-design-system.martha-client-secondary #view-operations .martha-operation-group {
    padding: 12px;
  }

  html body#martha-app.martha-design-system.martha-client-secondary #view-operations .martha-operation-navigation {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

html body#martha-app.martha-design-system.martha-client-secondary #view-guide .martha-prompt-library {
  padding: 0;
  overflow: hidden;
}

html body#martha-app.martha-design-system.martha-client-secondary #view-guide .martha-prompt-library-disclosure > summary {
  display: flex;
  min-height: 82px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 17px 20px;
  color: #171717;
  cursor: pointer;
  list-style: none;
}

html body#martha-app.martha-design-system.martha-client-secondary #view-guide .martha-prompt-library-disclosure > summary::-webkit-details-marker {
  display: none;
}

html body#martha-app.martha-design-system.martha-client-secondary #view-guide .martha-prompt-library-disclosure > summary:focus-visible {
  outline: 3px solid rgba(217, 168, 74, .45);
  outline-offset: -3px;
}

html body#martha-app.martha-design-system.martha-client-secondary #view-guide .martha-prompt-library-heading h3 {
  margin: 3px 0 5px;
  color: #171717;
  font-family: Fraunces, Georgia, 'Times New Roman', serif;
  font-size: clamp(20px, 2.2vw, 26px);
}

html body#martha-app.martha-design-system.martha-client-secondary #view-guide .martha-prompt-library-description {
  display: block;
  max-width: 680px;
  color: #746E64;
  font-size: 12px;
  line-height: 1.5;
}

html body#martha-app.martha-design-system.martha-client-secondary #view-guide .martha-prompt-library-disclosure > summary::after {
  display: grid;
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid #E8DFCC;
  border-radius: 50%;
  color: #8A581A;
  background: #F8F0E2;
  content: '+';
  font-size: 20px;
  line-height: 1;
}

html body#martha-app.martha-design-system.martha-client-secondary #view-guide .martha-prompt-library-disclosure[open] > summary::after {
  content: '−';
}

/* Activité — surface lisible cohérente avec les pages métier crème/or. */
html body#martha-app.martha-design-system.martha-client-secondary #view-decisions {
  --martha-ref-background: #FBFAF7;
  --martha-ref-foreground: #171717;
  --martha-ref-card: #FFFDF9;
  --martha-ref-muted-foreground: #746E64;
  --martha-ref-border: #E8DFCC;
  --martha-ds-ink-strong: #171717;
  --martha-ds-ink-soft: #6B4A1B;
  --martha-ds-line: #E8DFCC;
  --martha-ds-line-strong: #D9A84A;
  background: #FBFAF7 !important;
  color: #171717;
}

html body#martha-app.martha-design-system.martha-client-secondary #view-decisions .activity-human-feed-panel {
  padding: 14px;
  border: 1px solid #E8DFCC;
  border-radius: 22px;
  background: #FFFDF9;
  box-shadow: 0 8px 26px rgba(104, 78, 34, .06);
}

html body#martha-app.martha-design-system.martha-client-secondary #view-decisions .activity-human-card {
  gap: 10px;
  padding: 16px;
  border: 1px solid #E8DFCC;
  border-left: 4px solid #D9A84A;
  border-radius: 18px;
  color: #171717;
  background: linear-gradient(145deg, #FFFDF9, #FAF6EE);
  box-shadow: 0 4px 14px rgba(104, 78, 34, .05);
}

html body#martha-app.martha-design-system.martha-client-secondary #view-decisions .activity-human-card.activity-health-healthy {
  border-left-color: #B88936;
}

html body#martha-app.martha-design-system.martha-client-secondary #view-decisions .activity-human-card.activity-health-danger {
  border-left-color: #B44B43;
}

html body#martha-app.martha-design-system.martha-client-secondary #view-decisions .activity-human-kind,
html body#martha-app.martha-design-system.martha-client-secondary #view-decisions .activity-human-meta,
html body#martha-app.martha-design-system.martha-client-secondary #view-decisions .activity-human-audit,
html body#martha-app.martha-design-system.martha-client-secondary #view-decisions .activity-human-card details {
  color: #746E64;
}

html body#martha-app.martha-design-system.martha-client-secondary #view-decisions .activity-human-status {
  color: #54350C;
}

html body#martha-app.martha-design-system.martha-client-secondary #view-decisions .activity-human-card h3 {
  color: #171717;
  font-family: Fraunces, Georgia, 'Times New Roman', serif;
  font-size: 1.18rem;
  font-weight: 500;
}

html body#martha-app.martha-design-system.martha-client-secondary #view-decisions .activity-human-card p {
  color: #625B50;
}

html body#martha-app.martha-design-system.martha-client-secondary #view-decisions .activity-human-actions {
  border-top-color: #E8DFCC;
}

html body#martha-app.martha-design-system.martha-client-secondary #view-decisions .activity-human-actions .text-button {
  min-height: 40px;
  padding: 8px 13px;
  border: 1px solid #E8DFCC;
  border-radius: 999px;
  color: #6B4A1B;
  background: #FFFDF9;
}

html body#martha-app.martha-design-system.martha-client-secondary #view-decisions .activity-human-actions .text-button:hover,
html body#martha-app.martha-design-system.martha-client-secondary #view-decisions .activity-human-actions .text-button:focus-visible {
  border-color: #D9A84A;
  color: #54350C;
  background: #FBF1D9;
  outline: none;
}

html body#martha-app.martha-design-system.martha-client-secondary #view-decisions .activity-feed-toolbar select {
  min-height: 42px;
  border-color: #E8DFCC;
  border-radius: 13px;
  color: #171717;
  background: #FFFDF9;
}

html body#martha-app.martha-design-system.martha-client-secondary #view-decisions #activity-feed-message:not([hidden]) {
  display: block;
  margin: 10px 0;
  padding: 12px 14px;
  border: 1px solid #E8DFCC;
  border-radius: 14px;
  color: #6B4A1B;
  background: #FBF1D9;
}

html body#martha-app.martha-design-system.martha-client-secondary #view-guide .martha-prompt-library-content {
  padding: 0 20px 20px;
  border-top: 1px solid #E8DFCC;
  background: rgba(255, 253, 248, .74);
}

@media (max-width: 620px) {
  html body#martha-app.martha-design-system.martha-client-secondary #view-guide .martha-prompt-library-disclosure > summary {
    flex-wrap: wrap;
    gap: 10px;
    padding: 15px;
  }

  html body#martha-app.martha-design-system.martha-client-secondary #view-guide .martha-prompt-library-heading-copy {
    min-width: 0;
    flex: 1 1 210px;
  }

  html body#martha-app.martha-design-system.martha-client-secondary #view-guide .martha-prompt-library-total {
    margin-right: auto;
  }

  html body#martha-app.martha-design-system.martha-client-secondary #view-guide .martha-prompt-library-content {
    padding: 0 14px 14px;
  }
}

/* Finances — corriger les fonds charbon historiques et accorder les repères au thème. */
html body#martha-app.martha-design-system.martha-client-secondary #view-budgets {
  --martha-ref-background: #FBFAF7;
  --martha-ref-foreground: #171717;
  --martha-ref-card: #FFFDF9;
  --martha-ref-muted-foreground: #746E64;
  --martha-ref-border: #E8DFCC;
  --martha-ds-ink-strong: #171717;
  --martha-ds-ink-soft: #6B4A1B;
  --martha-ds-line: #E8DFCC;
  --martha-ds-line-strong: #D9A84A;
  background: #FBFAF7 !important;
  color: #171717;
}

html body#martha-app.martha-design-system.martha-client-secondary #view-budgets .panel {
  border: 1px solid #E8DFCC;
  border-radius: 22px;
  color: #171717;
  background: #FFFDF9;
  box-shadow: 0 7px 22px rgba(104, 78, 34, .055);
}

html body#martha-app.martha-design-system.martha-client-secondary #view-budgets .finance-cashflow-surface .panel-heading h3,
html body#martha-app.martha-design-system.martha-client-secondary #view-budgets .finance-statements-panel .panel-heading h3 {
  color: #171717;
  font-family: Fraunces, Georgia, 'Times New Roman', serif;
  font-size: 1.15rem;
  font-weight: 500;
}

html body#martha-app.martha-design-system.martha-client-secondary #view-budgets .finance-cashflow-surface .panel-heading p,
html body#martha-app.martha-design-system.martha-client-secondary #view-budgets .finance-statements-panel .panel-heading p,
html body#martha-app.martha-design-system.martha-client-secondary #view-budgets .finance-flow-legend,
html body#martha-app.martha-design-system.martha-client-secondary #view-budgets .finance-detail-grid span,
html body#martha-app.martha-design-system.martha-client-secondary #view-budgets .finance-detail-source,
html body#martha-app.martha-design-system.martha-client-secondary #view-budgets .finance-detail-empty,
html body#martha-app.martha-design-system.martha-client-secondary #view-budgets .finance-statements-summary span,
html body#martha-app.martha-design-system.martha-client-secondary #view-budgets .finance-category-chip small {
  color: #746E64;
}

html body#martha-app.martha-design-system.martha-client-secondary #view-budgets .finance-month-row {
  border-radius: 13px;
  color: #171717;
}

html body#martha-app.martha-design-system.martha-client-secondary #view-budgets .finance-month-row:hover,
html body#martha-app.martha-design-system.martha-client-secondary #view-budgets .finance-month-row:focus-visible,
html body#martha-app.martha-design-system.martha-client-secondary #view-budgets .finance-month-row.is-selected {
  border-color: #D9A84A;
  background: #FBF1D9;
}

html body#martha-app.martha-design-system.martha-client-secondary #view-budgets .finance-month-label,
html body#martha-app.martha-design-system.martha-client-secondary #view-budgets .finance-month-total,
html body#martha-app.martha-design-system.martha-client-secondary #view-budgets .finance-detail-grid strong,
html body#martha-app.martha-design-system.martha-client-secondary #view-budgets .finance-statements-summary strong,
html body#martha-app.martha-design-system.martha-client-secondary #view-budgets .finance-category-chip strong {
  color: #171717;
}

html body#martha-app.martha-design-system.martha-client-secondary #view-budgets .finance-flow-income {
  background-color: #B88936;
}

html body#martha-app.martha-design-system.martha-client-secondary #view-budgets .finance-flow-outflow {
  background-color: #8A581A;
}

html body#martha-app.martha-design-system.martha-client-secondary #view-budgets .finance-flow-estimated {
  background-image: repeating-linear-gradient(135deg, rgba(255, 253, 248, .82) 0 2px, transparent 2px 5px);
}

html body#martha-app.martha-design-system.martha-client-secondary #view-budgets .finance-flow-legend .finance-flow-estimated {
  background-color: #E7D4AF;
}

html body#martha-app.martha-design-system.martha-client-secondary #view-budgets .finance-detail-grid > div,
html body#martha-app.martha-design-system.martha-client-secondary #view-budgets .finance-statements-summary > div {
  border-color: #E8DFCC;
}

html body#martha-app.martha-design-system.martha-client-secondary #view-budgets .finance-statements-summary > div,
html body#martha-app.martha-design-system.martha-client-secondary #view-budgets .finance-category-chip {
  border: 1px solid #E8DFCC;
  border-radius: 15px;
  background: #FAF6EE;
}

html body#martha-app.martha-design-system.martha-client-secondary #view-budgets .finance-technical-details,
html body#martha-app.martha-design-system.martha-client-secondary #view-budgets .finance-legacy-details,
html body#martha-app.martha-design-system.martha-client-secondary #view-budgets .finance-export-details {
  border: 1px solid #E8DFCC;
  border-radius: 16px;
  color: #171717;
  background: #FFFDF9;
}

html body#martha-app.martha-design-system.martha-client-secondary #view-budgets .finance-technical-details summary,
html body#martha-app.martha-design-system.martha-client-secondary #view-budgets .finance-legacy-details summary,
html body#martha-app.martha-design-system.martha-client-secondary #view-budgets .finance-export-details summary {
  color: #6B4A1B;
  font-size: .85rem;
}

html body#martha-app.martha-design-system.martha-client-secondary #view-budgets .finance-technical-note,
html body#martha-app.martha-design-system.martha-client-secondary #view-budgets .finance-export-details pre {
  color: #625B50;
}

html body#martha-app.martha-design-system.martha-client-secondary #view-budgets .finance-detail-currency-note {
  margin: 10px 0 0;
  padding: 10px 12px;
  border: 1px solid #E8DFCC;
  border-radius: 12px;
  color: #6B4A1B;
  background: #FBF1D9;
  font-size: .82rem;
  line-height: 1.45;
}

/* Pilotage : les résultats précèdent les réglages, selon la palette commune. */
html body#martha-app.martha-design-system.martha-client-secondary #view-analytics {
  --martha-ref-background: #FBFAF7;
  --martha-ref-foreground: #171717;
  --martha-ref-card: #FFFDF9;
  --martha-ref-muted-foreground: #746E64;
  --martha-ref-border: #E8DFCC;
  --martha-ds-ink-strong: #171717;
  --martha-ds-ink-soft: #6B4A1B;
  --martha-ds-line: #E8DFCC;
  --martha-ds-line-strong: #D9A84A;
  background: #FBFAF7 !important;
  color: #171717;
}

html body#martha-app.martha-design-system.martha-client-secondary #ext21-bi-surface {
  gap: 18px;
  color: #171717;
}

html body#martha-app.martha-design-system.martha-client-secondary #ext21-bi-surface .panel,
html body#martha-app.martha-design-system.martha-client-secondary #ext21-bi-surface .ext21-metric-card,
html body#martha-app.martha-design-system.martha-client-secondary #ext21-bi-surface .ext21-dashboard-card {
  border: 1px solid #E8DFCC;
  border-radius: 20px;
  color: #171717;
  background: #FFFDF9;
  box-shadow: 0 7px 22px rgba(104, 78, 34, .055);
}

html body#martha-app.martha-design-system.martha-client-secondary #ext21-bi-surface .ext21-heading h2,
html body#martha-app.martha-design-system.martha-client-secondary #ext21-bi-surface .panel-heading h3 {
  color: #171717;
  font-family: Fraunces, Georgia, 'Times New Roman', serif;
  font-weight: 500;
}

html body#martha-app.martha-design-system.martha-client-secondary #ext21-bi-surface .ext21-summary {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  padding: 0;
  border: 0;
  background: transparent;
}

html body#martha-app.martha-design-system.martha-client-secondary #ext21-bi-surface .ext21-summary > span {
  padding: 15px;
  border: 1px solid #E8DFCC;
  border-radius: 16px;
  color: #746E64;
  background: #FFFDF9;
  box-shadow: 0 5px 16px rgba(104, 78, 34, .04);
  font-size: .8rem;
}

html body#martha-app.martha-design-system.martha-client-secondary #ext21-bi-surface .ext21-summary strong {
  color: #6B4A1B;
  font-size: 1.25rem;
}

html body#martha-app.martha-design-system.martha-client-secondary #ext21-bi-surface .ext21-workflow {
  display: grid;
  gap: 10px;
}

html body#martha-app.martha-design-system.martha-client-secondary #ext21-bi-surface .ext21-action-stage {
  overflow: hidden;
  border: 1px solid #E8DFCC;
  border-radius: 18px;
  background: #FFFDF9;
}

html body#martha-app.martha-design-system.martha-client-secondary #ext21-bi-surface .ext21-action-stage > summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 4px 16px;
  padding: 16px 18px;
  color: #6B4A1B;
  cursor: pointer;
  font-weight: 650;
  list-style-position: inside;
}

html body#martha-app.martha-design-system.martha-client-secondary #ext21-bi-surface .ext21-action-stage > summary small {
  grid-column: 2;
  grid-row: 1;
  color: #746E64;
  font-weight: 400;
}

html body#martha-app.martha-design-system.martha-client-secondary #ext21-bi-surface .ext21-action-stage[open] > summary {
  border-bottom: 1px solid #E8DFCC;
  background: #FBF1D9;
}

html body#martha-app.martha-design-system.martha-client-secondary #ext21-bi-surface .ext21-stage-panels {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 14px;
}

html body#martha-app.martha-design-system.martha-client-secondary #ext21-bi-surface .ext21-stage-panels .panel {
  margin: 0;
  box-shadow: none;
}

html body#martha-app.martha-design-system.martha-client-secondary #ext21-bi-surface .ext21-summary small,
html body#martha-app.martha-design-system.martha-client-secondary #ext21-bi-surface .ext21-row small,
html body#martha-app.martha-design-system.martha-client-secondary #ext21-bi-surface .ext21-dashboard-card details {
  color: #746E64;
}

html body#martha-app.martha-design-system.martha-client-secondary #ext21-bi-surface .ext21-row {
  border-bottom-color: #E8DFCC;
  color: #171717;
}

html body#martha-app.martha-design-system.martha-client-secondary #ext21-bi-surface .ext21-export-table-scroll {
  overflow-x: auto;
  border: 1px solid #E8DFCC;
  border-radius: 14px;
  background: #FFFDF9;
}

html body#martha-app.martha-design-system.martha-client-secondary #ext21-bi-surface .ext21-export-table-scroll table {
  width: 100%;
  border-collapse: collapse;
  color: #171717;
  font-size: .82rem;
}

html body#martha-app.martha-design-system.martha-client-secondary #ext21-bi-surface .ext21-export-table-scroll th,
html body#martha-app.martha-design-system.martha-client-secondary #ext21-bi-surface .ext21-export-table-scroll td {
  padding: 9px 11px;
  border-bottom: 1px solid #E8DFCC;
  text-align: left;
  vertical-align: top;
}

html body#martha-app.martha-design-system.martha-client-secondary #ext21-bi-surface .ext21-export-table-scroll th {
  color: #6B4A1B;
  background: #FBF1D9;
  font-weight: 650;
}

@media (max-width: 760px) {
  html body#martha-app.martha-design-system.martha-client-secondary #ext21-bi-surface .ext21-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  html body#martha-app.martha-design-system.martha-client-secondary #ext21-bi-surface .ext21-stage-panels {
    grid-template-columns: 1fr;
  }

  html body#martha-app.martha-design-system.martha-client-secondary #ext21-bi-surface .ext21-action-stage > summary {
    grid-template-columns: 1fr;
  }

  html body#martha-app.martha-design-system.martha-client-secondary #ext21-bi-surface .ext21-action-stage > summary small {
    grid-column: 1;
    grid-row: auto;
    padding-left: 20px;
  }
}

/* Lot parcours 2 — Équipe et Assistants IA : même palette et priorité lecture/action. */
html body#martha-app.martha-design-system.martha-client-secondary #view-agents {
  --line: #E8DFCC;
  --line-strong: #DCCFAF;
  --muted: #746E64;
  background: #FBFAF7 !important;
  color: #171717;
}

html body#martha-app.martha-design-system.martha-client-secondary #view-agents > .section-heading,
html body#martha-app.martha-design-system.martha-client-secondary #view-agents .agents-subsection-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-color: #E8DFCC;
  color: #171717;
}

html body#martha-app.martha-design-system.martha-client-secondary #view-agents > .section-heading h2,
html body#martha-app.martha-design-system.martha-client-secondary #view-agents .agents-subsection-heading h3 {
  color: #171717;
  font-family: Fraunces, Georgia, 'Times New Roman', serif;
}

html body#martha-app.martha-design-system.martha-client-secondary #view-agents .agents-subsection-heading {
  margin: 0 0 14px;
  padding: 4px 0 14px;
  border-bottom: 1px solid #E8DFCC;
}

html body#martha-app.martha-design-system.martha-client-secondary #view-agents .agents-subsection-heading h3,
html body#martha-app.martha-design-system.martha-client-secondary #view-agents .agents-subsection-heading p {
  margin: 0;
}

html body#martha-app.martha-design-system.martha-client-secondary #view-agents .agents-subsection-heading p,
html body#martha-app.martha-design-system.martha-client-secondary #view-agents .agents-workflow-disclosure > summary small {
  color: #746E64;
}

html body#martha-app.martha-design-system.martha-client-secondary #view-agents .agents-workspace {
  display: grid;
  gap: 18px;
}

html body#martha-app.martha-design-system.martha-client-secondary #view-agents .agents-workspace-tabs {
  display: flex;
  gap: 6px;
  width: fit-content;
  max-width: 100%;
  padding: 5px;
  border: 1px solid #E8DFCC;
  border-radius: 999px;
  background: #FFFDF9;
  box-shadow: 0 5px 18px rgba(119, 91, 41, .06);
}

html body#martha-app.martha-design-system.martha-client-secondary #view-agents .agents-workspace-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 44px;
  padding: 9px 17px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: #6B6254;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

html body#martha-app.martha-design-system.martha-client-secondary #view-agents .agents-workspace-tab > span {
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
  border-radius: 50%;
  background: #F5F0E6;
  color: #80602B;
  font-size: .68rem;
}

html body#martha-app.martha-design-system.martha-client-secondary #view-agents .agents-workspace-tab.is-active {
  border-color: #D7B86E;
  background: linear-gradient(180deg, #FFF5D9, #F4D991);
  color: #5D4219;
  box-shadow: 0 2px 6px rgba(140, 101, 26, .12);
}

html body#martha-app.martha-design-system.martha-client-secondary #view-agents .agents-workspace-panel[hidden] {
  display: none !important;
}

html body#martha-app.martha-design-system.martha-client-secondary #view-agents .agents-workspace-panel {
  display: grid;
  gap: 16px;
  min-width: 0;
  padding: 20px;
  border: 1px solid #E8DFCC;
  border-radius: 20px;
  background: linear-gradient(145deg, #FFFDF9, #FBF8F1);
  box-shadow: 0 10px 28px rgba(119, 91, 41, .06);
}

html body#martha-app.martha-design-system.martha-client-secondary #view-agents .agents-workflow-disclosure,
html body#martha-app.martha-design-system.martha-client-secondary #view-agents .agents-form-disclosure {
  overflow: hidden;
  border: 1px solid #E8DFCC;
  border-radius: 16px;
  background: #FFFDF9;
}

html body#martha-app.martha-design-system.martha-client-secondary #view-agents .agents-workflow-disclosure > summary,
html body#martha-app.martha-design-system.martha-client-secondary #view-agents .agents-form-disclosure > summary,
html body#martha-app.martha-design-system.martha-client-secondary #view-agents .agents-advanced-access > summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 16px;
  padding: 15px 18px;
  color: #6B4A1B;
  font-weight: 650;
  cursor: pointer;
  list-style-position: inside;
}

html body#martha-app.martha-design-system.martha-client-secondary #view-agents .agents-workflow-disclosure[open] > summary,
html body#martha-app.martha-design-system.martha-client-secondary #view-agents .agents-form-disclosure[open] > summary,
html body#martha-app.martha-design-system.martha-client-secondary #view-agents .agents-advanced-access[open] > summary {
  border-bottom: 1px solid #E8DFCC;
  background: #FBF1D9;
}

html body#martha-app.martha-design-system.martha-client-secondary #view-agents :is(.human-team-toolbar, .human-team-grid, .panel, .agent-record) {
  border-color: #E8DFCC;
  background-color: #FFFDF9;
  color: #171717;
}

html body#martha-app.martha-design-system.martha-client-secondary #view-agents .human-team-toolbar,
html body#martha-app.martha-design-system.martha-client-secondary #view-agents .human-team-card,
html body#martha-app.martha-design-system.martha-client-secondary #view-agents .agents-workflow-disclosure > section,
html body#martha-app.martha-design-system.martha-client-secondary #view-agents .agents-form-disclosure > .two-columns,
html body#martha-app.martha-design-system.martha-client-secondary #view-agents .agents-workflow-disclosure > #ext15-hr-operations-surface,
html body#martha-app.martha-design-system.martha-client-secondary #view-agents .agents-workflow-disclosure > #ext17-development-surface {
  margin: 14px;
}

html body#martha-app.martha-design-system.martha-client-secondary #view-agents .human-team-card:hover,
html body#martha-app.martha-design-system.martha-client-secondary #view-agents .human-team-card:focus-visible {
  border-color: #D7B86E;
  background: #FBF1D9;
}

html body#martha-app.martha-design-system.martha-client-secondary #view-agents :is(.agents-workspace-panel .primary, .agents-workflow-disclosure .primary, .agents-form-disclosure .primary) {
  border: 1px solid #BE8D32;
  border-radius: 13px;
  background: linear-gradient(180deg, #F3D47E, #E6B84D);
  color: #3F2D11;
  box-shadow: 0 3px 9px rgba(140, 101, 26, .12);
}

html body#martha-app.martha-design-system.martha-client-secondary #view-agents .agent-record {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 15px;
  border: 1px solid #E8DFCC;
  border-radius: 15px;
  background: #FFFDF9;
}

html body#martha-app.martha-design-system.martha-client-secondary #view-agents .agent-record-copy,
html body#martha-app.martha-design-system.martha-client-secondary #view-agents .agent-record-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px 12px;
}

html body#martha-app.martha-design-system.martha-client-secondary #view-agents .agent-record-copy {
  align-items: flex-start;
  flex-direction: column;
  min-width: 0;
}

html body#martha-app.martha-design-system.martha-client-secondary #view-agents .agent-record-copy > strong {
  color: #6B4A1B;
  font-size: 1rem;
}

html body#martha-app.martha-design-system.martha-client-secondary #view-agents .agent-record-copy > span,
html body#martha-app.martha-design-system.martha-client-secondary #view-agents .agent-record-copy > small {
  color: #746E64;
  overflow-wrap: anywhere;
}

html body#martha-app.martha-design-system.martha-client-secondary #view-agents .agent-status-action {
  min-height: 36px;
  padding: 7px 11px;
  border: 1px solid #DCCFAF;
  border-radius: 10px;
  background: #FFFDF9;
  color: #6B4A1B;
}

html body#martha-app.martha-design-system.martha-client-secondary #view-agents .agent-status-action-danger {
  border-color: #D8AAA2;
  color: #8B3329;
}

html body#martha-app.martha-design-system.martha-client-secondary #view-agents .agents-assistant-form-card,
html body#martha-app.martha-design-system.martha-client-secondary #view-agents .agents-assistant-list-card {
  margin: 14px;
  border: 0;
  box-shadow: none;
}

html body#martha-app.martha-design-system.martha-client-secondary #view-agents .agents-advanced-access {
  grid-column: 1 / -1;
  overflow: hidden;
  border: 1px solid #E8DFCC;
  border-radius: 13px;
  background: #FBFAF7;
}

html body#martha-app.martha-design-system.martha-client-secondary #view-agents .agents-advanced-access > p {
  margin: 0 15px 12px;
}

html body#martha-app.martha-design-system.martha-client-secondary #view-agents .team-ai-subview {
  display: grid;
  gap: 12px;
}

html body#martha-app.martha-design-system.martha-client-secondary #view-agents :is(.ext15-hr-operations-surface, #ext15-hr-operations-surface, #ext17-development-surface) {
  color: #171717;
}

html body#martha-app.martha-design-system.martha-client-secondary #view-agents :is(#ext15-hr-operations-surface, #ext17-development-surface) .section-heading h2,
html body#martha-app.martha-design-system.martha-client-secondary #view-agents :is(#ext15-hr-operations-surface, #ext17-development-surface) .panel-heading h3 {
  color: #171717;
  font-family: Fraunces, Georgia, 'Times New Roman', serif;
}

@media (max-width: 760px) {
  html body#martha-app.martha-design-system.martha-client-secondary #view-agents .agents-workspace-panel { padding: 15px; }
  html body#martha-app.martha-design-system.martha-client-secondary #view-agents .agents-workspace-tabs { width: 100%; }
  html body#martha-app.martha-design-system.martha-client-secondary #view-agents .agents-workspace-tab { flex: 1; padding: 8px 9px; }
  html body#martha-app.martha-design-system.martha-client-secondary #view-agents .agents-subsection-heading,
  html body#martha-app.martha-design-system.martha-client-secondary #view-agents .agent-record { align-items: stretch; flex-direction: column; }
  html body#martha-app.martha-design-system.martha-client-secondary #view-agents .agent-record-actions { justify-content: flex-start; }
}

html body#martha-app.martha-design-system.martha-client-secondary #view-agents :is(input, select, textarea) {
  border-color: #DCCFAF;
  border-radius: 11px;
  background: #FFFEFB;
  color: #171717;
}

html body#martha-app.martha-design-system.martha-client-secondary #view-agents :is(.human-team-avatar, .human-team-status) {
  border-color: #DCCFAF;
  background: #F7E8C3;
  color: #6B4A1B;
}

html body#martha-app.martha-design-system.martha-client-secondary #view-agents :is(.human-team-toolbar, .agents-team-extension .panel, .agents-team-extension .hr-operations-list > li, .agents-team-extension .ext17-development-list > li, .human-team-person-grid > div) {
  border-color: #E8DFCC;
  background: #FFFDF9;
  color: #171717;
}

html body#martha-app.martha-design-system.martha-client-secondary #view-agents :is(.human-team-toolbar strong, .hr-operations-list strong, .hr-operations-list span, .ext17-development-list strong, .ext17-development-list span, .event-meta, .field-hint) {
  color: #746E64;
}

html body#martha-app.martha-design-system.martha-client-secondary #view-agents :is(.human-team-dialog, .human-team-dialog form) {
  border-color: #E8DFCC;
  border-radius: 20px;
  background: #FFFDF9;
  color: #171717;
}

/* PAGES-METIER-09 — fonctions, modèles, connexions et suivi des actions. */
html body#martha-app.martha-design-system.martha-client-secondary :is(#view-actions, #view-models, #view-execution, #view-connectors) {
  color: #2A2420;
}

html body#martha-app.martha-design-system.martha-client-secondary :is(#view-actions, #view-models, #view-execution, #view-connectors) > .section-heading {
  margin-bottom: 20px;
  border-color: #E8DFCC;
  border-radius: 22px;
  background: linear-gradient(145deg, #FFFDF8 0%, #F8F2E7 100%);
  box-shadow: 0 8px 24px rgba(95, 69, 29, .045);
}

html body#martha-app.martha-design-system.martha-client-secondary :is(#view-actions, #view-models, #view-execution, #view-connectors) :is(.panel, .martha-journey-disclosure) {
  border: 1px solid #E8DFCC;
  border-radius: 19px;
  background: #FFFDF9;
  color: #2A2420;
  box-shadow: 0 5px 17px rgba(95, 69, 29, .04);
}

html body#martha-app.martha-design-system.martha-client-secondary :is(#view-actions, #view-models, #view-execution, #view-connectors) > .two-columns {
  gap: 16px;
  margin-bottom: 16px;
}

html body#martha-app.martha-design-system.martha-client-secondary :is(#view-actions, #view-models, #view-execution, #view-connectors) .martha-journey-disclosure {
  margin: 14px 0;
  padding: 0;
  overflow: hidden;
}

html body#martha-app.martha-design-system.martha-client-secondary :is(#view-actions, #view-models, #view-execution, #view-connectors) .martha-journey-disclosure > summary {
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 18px;
  color: #6B4A1B;
  font-weight: 700;
  cursor: pointer;
  list-style-position: inside;
}

html body#martha-app.martha-design-system.martha-client-secondary :is(#view-actions, #view-models, #view-execution, #view-connectors) .martha-journey-disclosure[open] > summary {
  border-bottom: 1px solid #E8DFCC;
  background: #FBF7EE;
}

html body#martha-app.martha-design-system.martha-client-secondary :is(#view-actions, #view-models, #view-execution, #view-connectors) .journey-disclosure-body,
html body#martha-app.martha-design-system.martha-client-secondary :is(#view-actions, #view-models, #view-execution, #view-connectors) .martha-journey-disclosure > form {
  display: grid;
  gap: 14px;
  padding: 18px;
}

html body#martha-app.martha-design-system.martha-client-secondary :is(#view-actions, #view-models, #view-execution, #view-connectors) .martha-advanced-configuration,
html body#martha-app.martha-design-system.martha-client-secondary #view-actions .action-advanced-field {
  padding: 12px 14px;
  border: 1px solid #E8DFCC;
  border-radius: 13px;
  background: #FBFAF7;
}

html body#martha-app.martha-design-system.martha-client-secondary :is(#view-actions, #view-models, #view-execution, #view-connectors) :is(input, select, textarea) {
  min-height: 44px;
  border: 1px solid #DCCFAF;
  border-radius: 11px;
  background: #FFFEFB;
  color: #2A2420;
}

html body#martha-app.martha-design-system.martha-client-secondary :is(#view-actions, #view-models, #view-execution, #view-connectors) select[multiple] {
  min-height: 112px;
  padding: 9px;
}

html body#martha-app.martha-design-system.martha-client-secondary :is(#view-actions, #view-models, #view-execution, #view-connectors) :is(.primary, button[type="submit"]) {
  min-height: 46px;
  border: 1px solid #BE8D32;
  border-radius: 13px;
  background: linear-gradient(180deg, #F3D47E, #E6B84D);
  color: #3F2D11;
  font-weight: 700;
  box-shadow: 0 3px 9px rgba(140, 101, 26, .12);
}

html body#martha-app.martha-design-system.martha-client-secondary :is(#view-actions, #view-models, #view-execution, #view-connectors) .list:not(.empty) > .event {
  margin: 8px 0;
  padding: 15px;
  border: 1px solid #E8DFCC;
  border-radius: 15px;
  background: #FFFDF9;
  color: #2A2420;
}

html body#martha-app.martha-design-system.martha-client-secondary #view-actions .action-contract > summary {
  border-color: #E8DFCC;
  border-radius: 14px;
  background: #FFFDF9;
}

html body#martha-app.martha-design-system.martha-client-secondary #view-actions .action-contract[open] > .event-main {
  display: grid;
  gap: 14px;
  padding: 16px;
}

html body#martha-app.martha-design-system.martha-client-secondary #view-actions .action-field-unavailable {
  grid-column: 1 / -1;
  padding: 12px 14px;
  border: 1px solid #E8DFCC;
  border-radius: 12px;
  background: #FBF7EE;
  color: #6B4A1B;
  line-height: 1.5;
}

html body#martha-app.martha-design-system.martha-client-secondary :is(#view-actions, #view-models, #view-execution, #view-connectors) :is(.event-meta, .field-hint) {
  color: #746E64;
}

html body#martha-app.martha-design-system.martha-client-secondary :is(#view-actions, #view-models, #view-execution, #view-connectors) button:disabled {
  cursor: not-allowed;
  opacity: .58;
  box-shadow: none;
}

html body#martha-app.martha-design-system.martha-client-secondary #view-connectors .martha-connector-template {
  min-height: 58px;
  border: 1px solid #E8DFCC;
  border-radius: 13px;
  background: #FFFDF9;
  color: #2A2420;
}

html body#martha-app.martha-design-system.martha-client-secondary #view-connectors .martha-connector-template:hover,
html body#martha-app.martha-design-system.martha-client-secondary #view-connectors .martha-connector-template:focus-visible {
  border-color: #BE8D32;
  background: #FBF7EE;
  outline: 3px solid rgba(190, 141, 50, .18);
}

html body#martha-app.martha-design-system.martha-client-secondary #view-connectors :is(.martha-connector-template b, .martha-connector-template small) {
  color: #2A2420;
  font-size: 12px;
}

html body#martha-app.martha-design-system.martha-client-secondary #view-connectors .martha-connector-template small {
  color: #746E64;
  font-size: 10px;
}

html body#martha-app.martha-design-system.martha-client-secondary #view-connectors .martha-provider-mark {
  border: 1px solid #E8DFCC;
  border-radius: 9px;
  color: #6B4A1B;
  background: #F7E8C3;
  box-shadow: none;
}

html body#martha-app.martha-design-system.martha-client-secondary #view-connectors .martha-connector-kicker {
  color: #8A6725;
}

@media (max-width: 760px) {
  html body#martha-app.martha-design-system.martha-client-secondary :is(#view-actions, #view-models, #view-execution, #view-connectors) > .two-columns { grid-template-columns: 1fr; }
  html body#martha-app.martha-design-system.martha-client-secondary :is(#view-actions, #view-models, #view-execution, #view-connectors) .journey-disclosure-body,
  html body#martha-app.martha-design-system.martha-client-secondary :is(#view-actions, #view-models, #view-execution, #view-connectors) .martha-journey-disclosure > form { padding: 14px; }
  html body#martha-app.martha-design-system.martha-client-secondary :is(#view-actions, #view-models, #view-execution, #view-connectors) .martha-journey-disclosure > summary { align-items: flex-start; }
}

html body#martha-app.martha-design-system.martha-client-secondary :is(#view-actions, #view-models, #view-execution, #view-connectors, #view-incidents, #view-governance) :is(.list:not(.empty) > *, .event, .v2-row) {
  border-color: #E8DFCC;
  border-radius: 16px;
  color: #2A2420;
  background: #FFFDF8;
}

html body#martha-app.martha-design-system.martha-client-secondary #view-incidents .health-card {
  border-left: 4px solid #6E7F5C;
}

html body#martha-app.martha-design-system.martha-client-secondary :is(#view-models, #view-connectors, #view-governance) .panel-heading h3 {
  color: #2A2420;
  font-family: Fraunces, Georgia, 'Times New Roman', serif;
}

@media (max-width: 700px) {
  html body#martha-app.martha-design-system.martha-client-secondary :is(#view-actions, #view-models, #view-execution, #view-connectors, #view-incidents, #view-governance) > .section-heading { padding: 18px; }
}

/* PAGES-METIER-10 — sites, espaces de partage, événements et fiches personnalisées. */
html body#martha-app.martha-design-system.martha-client-secondary :is(#view-site, #view-portals, #view-events, #view-extensions) :is(.section-heading, [class*="-summary"]) {
  border: 1px solid #E8DFCC;
  border-radius: 22px;
  color: #2A2420;
  background: linear-gradient(140deg, #FFFDF8 0%, #F5EEE0 100%);
  box-shadow: 0 8px 24px rgba(95, 69, 29, .045);
}

html body#martha-app.martha-design-system.martha-client-secondary :is(#view-site, #view-portals, #view-events, #view-extensions) :is(.ext20-summary, .ext22-summary, .ext24-summary, .ext25-summary) {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 10px;
  padding: 16px;
}

html body#martha-app.martha-design-system.martha-client-secondary :is(#view-site, #view-portals, #view-events, #view-extensions) :is(.ext20-summary, .ext22-summary, .ext24-summary, .ext25-summary) > span {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 12px;
  border: 1px solid #E8DFCC;
  border-radius: 14px;
  background: #FFFDF8;
}

html body#martha-app.martha-design-system.martha-client-secondary :is(#view-site, #view-portals, #view-events, #view-extensions) :is(.ext20-summary, .ext22-summary, .ext24-summary, .ext25-summary) b {
  color: #766D60;
  font-size: 12px;
  font-weight: 600;
}

html body#martha-app.martha-design-system.martha-client-secondary :is(#view-site, #view-portals, #view-events, #view-extensions) :is(.ext20-summary, .ext22-summary, .ext24-summary, .ext25-summary) strong {
  color: #6B4A1B;
  font-family: Fraunces, Georgia, 'Times New Roman', serif;
  font-size: 20px;
  font-weight: 600;
  overflow-wrap: anywhere;
}

html body#martha-app.martha-design-system.martha-client-secondary :is(#view-site, #view-portals, #view-events, #view-extensions) :is(.ext20-forms, .ext22-forms, .ext24-forms, .ext25-forms) {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 330px), 1fr));
  align-items: start;
  gap: 14px;
  margin-block: 16px;
}

html body#martha-app.martha-design-system.martha-client-secondary :is(#view-site, #view-portals, #view-events, #view-extensions) .martha-business-action {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  border: 1px solid #E8DFCC;
  border-radius: 18px;
  color: #2A2420;
  background: #FFFDF8;
  box-shadow: 0 5px 17px rgba(95, 69, 29, .04);
}

html body#martha-app.martha-design-system.martha-client-secondary :is(#view-site, #view-portals, #view-events, #view-extensions) .martha-business-action > summary {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 17px;
  color: #6B4A1B;
  font-weight: 700;
  cursor: pointer;
  list-style-position: inside;
}

html body#martha-app.martha-design-system.martha-client-secondary :is(#view-site, #view-portals, #view-events, #view-extensions) .martha-business-action > summary span {
  display: grid;
  gap: 3px;
}

html body#martha-app.martha-design-system.martha-client-secondary :is(#view-site, #view-portals, #view-events, #view-extensions) .martha-business-action > summary small {
  color: #766D60;
  font-size: 12px;
  font-weight: 500;
}

html body#martha-app.martha-design-system.martha-client-secondary :is(#view-site, #view-portals, #view-events, #view-extensions) .martha-business-action[open] > summary {
  border-bottom: 1px solid #E8DFCC;
  background: #FBF7EE;
}

html body#martha-app.martha-design-system.martha-client-secondary :is(#view-site, #view-portals, #view-events, #view-extensions) .martha-business-action > .martha-business-action-panel {
  margin: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

html body#martha-app.martha-design-system.martha-client-secondary :is(#view-site, #view-portals, #view-events, #view-extensions) :is(.ext20-site-grid, .ext24-event-grid, .ext25-card-grid) {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 14px;
  margin-block: 16px;
}

html body#martha-app.martha-design-system.martha-client-secondary :is(#view-site, #view-portals, #view-events, #view-extensions) :is(input, select, textarea) {
  min-height: 44px;
  border: 1px solid #DCCFAF;
  border-radius: 11px;
  color: #2A2420;
  background: #FFFEFB;
}

html body#martha-app.martha-design-system.martha-client-secondary #view-extensions .ext25-mapping-rows {
  display: grid;
  gap: 10px;
  margin: 12px 0;
}

html body#martha-app.martha-design-system.martha-client-secondary #view-extensions .ext25-map-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
  padding: 12px;
  border: 1px solid #E8DFCC;
  border-radius: 12px;
  background: #FBF7EE;
}

html body#martha-app.martha-design-system.martha-client-secondary :is(#view-site, #view-portals, #view-events, #view-extensions) .section-heading h2,
html body#martha-app.martha-design-system.martha-client-secondary :is(#view-site, #view-portals, #view-events, #view-extensions) .panel-heading h3 {
  color: #2A2420;
  font-family: Fraunces, Georgia, 'Times New Roman', serif;
}

@media (max-width: 700px) {
  html body#martha-app.martha-design-system.martha-client-secondary :is(#view-site, #view-portals, #view-events, #view-extensions) :is(.section-heading, .martha-business-action > summary) { padding: 16px; }
  html body#martha-app.martha-design-system.martha-client-secondary :is(#view-site, #view-portals, #view-events, #view-extensions) :is(.ext20-summary, .ext22-summary, .ext24-summary, .ext25-summary) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  html body#martha-app.martha-design-system.martha-client-secondary #view-extensions .ext25-map-row { grid-template-columns: minmax(0, 1fr); }
}


/* PAGES-METIER-11 — Documents et souvenirs : lecture d’abord, gestes guidés ensuite. */
html body#martha-app.martha-design-system.martha-client-secondary #view-research #documents-workspace {
  display: grid;
  gap: 18px;
}
html body#martha-app.martha-design-system.martha-client-secondary #view-research #documents-workspace > .section-heading {
  align-items: center;
  border: 1px solid #E8DFCC;
  border-radius: 22px;
  padding: 22px;
  color: #2A2420;
  background: linear-gradient(140deg, #FFFDF8 0%, #F5EEE0 100%);
  box-shadow: 0 8px 24px rgba(95, 69, 29, .045);
}
html body#martha-app.martha-design-system.martha-client-secondary #documents-workspace .documents-library-panel,
html body#martha-app.martha-design-system.martha-client-secondary #view-memory > .panel {
  min-width: 0;
  border: 1px solid #E8DFCC;
  border-radius: 20px;
  color: #2A2420;
  background: #FFFDF8;
  box-shadow: 0 6px 18px rgba(95, 69, 29, .04);
}
html body#martha-app.martha-design-system.martha-client-secondary #documents-workspace .documents-file-grid {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 205px), 1fr));
  gap: 14px;
}
html body#martha-app.martha-design-system.martha-client-secondary #documents-workspace .documents-file-card {
  min-height: 185px;
  border: 1px solid #E8DFCC;
  border-radius: 16px;
  color: #2A2420;
  background: #FFFEFB;
  box-shadow: 0 4px 12px rgba(95, 69, 29, .035);
}
html body#martha-app.martha-design-system.martha-client-secondary #documents-workspace .documents-file-card:hover,
html body#martha-app.martha-design-system.martha-client-secondary #documents-workspace .documents-file-card:focus-visible {
  border-color: #C99C47;
  box-shadow: 0 8px 20px rgba(95, 69, 29, .10);
}
html body#martha-app.martha-design-system.martha-client-secondary #documents-workspace .documents-file-thumb,
html body#martha-app.martha-design-system.martha-client-secondary #documents-workspace .documents-file-thumb-png,
html body#martha-app.martha-design-system.martha-client-secondary #documents-workspace .documents-file-thumb-jpg,
html body#martha-app.martha-design-system.martha-client-secondary #documents-workspace .documents-file-thumb-jpeg,
html body#martha-app.martha-design-system.martha-client-secondary #documents-workspace .documents-file-thumb-csv {
  color: #76551F;
  background: linear-gradient(145deg, #F8E9BE, #E9C978);
}
html body#martha-app.martha-design-system.martha-client-secondary #documents-workspace .documents-file-thumb-pdf {
  color: #76551F;
  background: linear-gradient(145deg, #F4E5D8, #E9C978);
}
html body#martha-app.martha-design-system.martha-client-secondary #documents-workspace .documents-file-type {
  color: #6B4A1B;
  background: rgba(255, 253, 248, .92);
}
html body#martha-app.martha-design-system.martha-client-secondary #documents-workspace :is(.documents-upload-details, .documents-advanced) {
  border: 1px solid #E8DFCC;
  border-radius: 16px;
  color: #2A2420;
  background: #FFFDF8;
}
html body#martha-app.martha-design-system.martha-client-secondary #documents-workspace :is(.documents-upload-details, .documents-advanced) > summary {
  min-height: 54px;
  color: #6B4A1B;
  font-size: 14px;
}
html body#martha-app.martha-design-system.martha-client-secondary #documents-workspace .documents-upload-form {
  max-width: none;
  border-top: 1px solid #E8DFCC;
  padding: 16px 0 0;
}
html body#martha-app.martha-design-system.martha-client-secondary #documents-workspace :is(input, select, textarea) {
  min-height: 44px;
  border: 1px solid #DCCFAF;
  border-radius: 11px;
  color: #2A2420;
  background: #FFFEFB;
}
html body#martha-app.martha-design-system.martha-client-secondary #view-research .documents-detail-dialog {
  color: #2A2420;
  border: 1px solid #DCCFAF;
  border-radius: 22px;
  background: #FFFDF8;
  box-shadow: 0 24px 70px rgba(67, 48, 21, .22);
}
html body#martha-app.martha-design-system.martha-client-secondary #view-research .documents-detail-dialog::backdrop {
  background: rgba(42, 36, 32, .34);
  backdrop-filter: blur(3px);
}
html body#martha-app.martha-design-system.martha-client-secondary #view-research .documents-detail-grid > div {
  border: 1px solid #E8DFCC;
  border-radius: 12px;
  background: #FBF7EE;
}
html body#martha-app.martha-design-system.martha-client-secondary #view-research .documents-detail-grid span {
  color: #766D60;
}
html body#martha-app.martha-design-system.martha-client-secondary #view-memory .martha-memory-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
  gap: 14px;
  margin-top: 16px;
}
html body#martha-app.martha-design-system.martha-client-secondary #view-memory .martha-business-action {
  overflow: hidden;
  border: 1px solid #E8DFCC;
  border-radius: 18px;
  color: #2A2420;
  background: #FFFDF8;
  box-shadow: 0 5px 17px rgba(95, 69, 29, .04);
}
html body#martha-app.martha-design-system.martha-client-secondary #view-memory .martha-business-action > summary {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 17px;
  color: #6B4A1B;
  font-weight: 700;
  cursor: pointer;
}
html body#martha-app.martha-design-system.martha-client-secondary #view-memory .martha-business-action[open] > summary {
  border-bottom: 1px solid #E8DFCC;
  background: #FBF7EE;
}
html body#martha-app.martha-design-system.martha-client-secondary #view-memory .martha-business-action-panel {
  margin: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
html body#martha-app.martha-design-system.martha-client-secondary #view-memory .memory-governance-item,
html body#martha-app.martha-design-system.martha-client-secondary #view-memory .memory-evidence-item {
  border: 1px solid #E8DFCC;
  border-radius: 16px;
  color: #2A2420;
  background: #FFFEFB;
}
html body#martha-app.martha-design-system.martha-client-secondary #view-memory .memory-evidence-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
}
html body#martha-app.martha-design-system.martha-client-secondary #view-memory .memory-evidence-item span,
html body#martha-app.martha-design-system.martha-client-secondary #view-memory .memory-source-details {
  color: #766D60;
}
html body#martha-app.martha-design-system.martha-client-secondary #view-memory .memory-source-details {
  border-color: #E8DFCC;
}
html body#martha-app.martha-design-system.martha-client-secondary #view-memory .memory-source-details li,
html body#martha-app.martha-design-system.martha-client-secondary #view-memory .memory-source-details code {
  color: #2A2420;
  background: #FBF7EE;
}
html body#martha-app.martha-design-system.martha-client-secondary #view-memory .form :is(input, select, textarea) {
  min-height: 44px;
  border: 1px solid #DCCFAF;
  border-radius: 11px;
  color: #2A2420;
  background: #FFFEFB;
}
html body#martha-app.martha-design-system.martha-client-secondary #view-memory .button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}
@media (max-width: 700px) {
  html body#martha-app.martha-design-system.martha-client-secondary #view-research #documents-workspace > .section-heading { align-items: stretch; padding: 17px; }
  html body#martha-app.martha-design-system.martha-client-secondary #view-research #documents-workspace .documents-toolbar { flex-wrap: wrap; }
  html body#martha-app.martha-design-system.martha-client-secondary #view-research #documents-workspace .documents-file-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  html body#martha-app.martha-design-system.martha-client-secondary #view-memory .memory-evidence-item { align-items: flex-start; flex-direction: column; }
  html body#martha-app.martha-design-system.martha-client-secondary #view-memory .martha-business-action > summary { padding: 15px; }
}

/* PAGES-METIER-12 — tableau de bord, portefeuille, santé et gouvernance. */
html body#martha-app.martha-design-system.martha-client-secondary #view-overview > .hero {
  border: 1px solid #E8D7B1;
  border-radius: 24px;
  background: linear-gradient(128deg, #FFFDF8 0%, #F8F0DF 100%);
  box-shadow: 0 12px 32px rgba(102, 73, 27, .07);
}
html body#martha-app.martha-design-system.martha-client-secondary #view-overview > #leader-briefing,
html body#martha-app.martha-design-system.martha-client-secondary #view-overview > .two-columns > .panel,
html body#martha-app.martha-design-system.martha-client-secondary #view-portfolio .panel,
html body#martha-app.martha-design-system.martha-client-secondary #view-incidents .health-card {
  border: 1px solid #E8DFCC;
  border-radius: 20px;
  color: #2A2420;
  background: #FFFDF8;
  box-shadow: 0 7px 22px rgba(95, 69, 29, .05);
}
html body#martha-app.martha-design-system.martha-client-secondary #view-incidents .martha-health-sections {
  display: grid;
  gap: 13px;
  margin-top: 18px;
}
html body#martha-app.martha-design-system.martha-client-secondary #view-incidents .martha-health-section {
  overflow: hidden;
  border: 1px solid #E8DFCC;
  border-radius: 18px;
  color: #2A2420;
  background: #FFFDF8;
  box-shadow: 0 5px 17px rgba(95, 69, 29, .04);
}
html body#martha-app.martha-design-system.martha-client-secondary #view-incidents .martha-health-section > summary {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  color: #6B4A1B;
  background: #FBF7EE;
  font-weight: 700;
  cursor: pointer;
}
html body#martha-app.martha-design-system.martha-client-secondary #view-incidents .martha-health-section > summary small {
  display: block;
  margin-top: 3px;
  color: #766D60;
  font-size: 12px;
  font-weight: 500;
}
html body#martha-app.martha-design-system.martha-client-secondary #view-incidents .martha-health-section[open] > summary {
  border-bottom: 1px solid #E8DFCC;
  background: #F8F0DF;
}
html body#martha-app.martha-design-system.martha-client-secondary #view-incidents .martha-health-section-body {
  display: grid;
  gap: 14px;
  padding: 14px;
}
html body#martha-app.martha-design-system.martha-client-secondary #view-incidents .martha-health-section-body > .two-columns {
  margin: 0;
}
html body#martha-app.martha-design-system.martha-client-secondary #view-incidents .martha-health-section-body .panel {
  border: 1px solid #EDE4D3;
  border-radius: 15px;
  color: #2A2420;
  background: #FFFEFB;
  box-shadow: none;
}
html body#martha-app.martha-design-system.martha-client-secondary #view-overview #leader-briefing {
  margin: 18px 0;
}
html body#martha-app.martha-design-system.martha-client-secondary #view-overview #leader-briefing .metric-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 185px), 1fr));
  gap: 11px;
}
html body#martha-app.martha-design-system.martha-client-secondary #view-overview #leader-briefing .metric,
html body#martha-app.martha-design-system.martha-client-secondary #view-overview > .metric-grid .metric {
  min-width: 0;
  border: 1px solid #EDE4D3;
  border-radius: 16px;
  color: #2A2420;
  background: #FBF7EE;
}
html body#martha-app.martha-design-system.martha-client-secondary #view-overview .metric :is(span, small),
html body#martha-app.martha-design-system.martha-client-secondary #view-overview .event-meta {
  color: #766D60;
}
html body#martha-app.martha-design-system.martha-client-secondary #view-overview .metric strong {
  color: #6B4A1B;
  overflow-wrap: anywhere;
}
html body#martha-app.martha-design-system.martha-client-secondary #view-overview .checkpoint-review {
  margin-top: 10px;
}
html body#martha-app.martha-design-system.martha-client-secondary #view-overview .checkpoint-review > summary,
html body#martha-app.martha-design-system.martha-client-secondary #view-portfolio .portfolio-tree-tools,
html body#martha-app.martha-design-system.martha-client-secondary #view-portfolio .portfolio-freshness {
  color: #6B4A1B;
}
html body#martha-app.martha-design-system.martha-client-secondary #view-overview .checkpoint-note-label {
  display: grid;
  gap: 6px;
  color: #766D60;
  font-size: 13px;
}
html body#martha-app.martha-design-system.martha-client-secondary #view-overview .checkpoint-note,
html body#martha-app.martha-design-system.martha-client-secondary #view-portfolio :is(input, select, textarea) {
  min-height: 44px;
  border: 1px solid #DCCFAF;
  border-radius: 11px;
  color: #2A2420;
  background: #FFFEFB;
}
html body#martha-app.martha-design-system.martha-client-secondary #view-portfolio .portfolio-create-disclosure,
html body#martha-app.martha-design-system.martha-client-secondary #view-governance .martha-governance-section {
  overflow: hidden;
  border: 1px solid #E8DFCC;
  border-radius: 18px;
  color: #2A2420;
  background: #FFFDF8;
  box-shadow: 0 5px 17px rgba(95, 69, 29, .04);
}
html body#martha-app.martha-design-system.martha-client-secondary #view-portfolio .portfolio-create-disclosure > summary,
html body#martha-app.martha-design-system.martha-client-secondary #view-governance .martha-governance-section > summary {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  color: #6B4A1B;
  background: #FBF7EE;
  font-weight: 700;
  cursor: pointer;
}
html body#martha-app.martha-design-system.martha-client-secondary #view-governance .martha-governance-section > summary small,
html body#martha-app.martha-design-system.martha-client-secondary #view-portfolio .portfolio-create-disclosure > summary small {
  display: block;
  margin-top: 3px;
  color: #766D60;
  font-size: 12px;
  font-weight: 500;
}
html body#martha-app.martha-design-system.martha-client-secondary #view-governance .martha-governance-section[open] > summary,
html body#martha-app.martha-design-system.martha-client-secondary #view-portfolio .portfolio-create-disclosure[open] > summary {
  border-bottom: 1px solid #E8DFCC;
  background: #F8F0DF;
}
html body#martha-app.martha-design-system.martha-client-secondary #view-governance .martha-governance-sections {
  display: grid;
  gap: 13px;
  margin-top: 18px;
}
html body#martha-app.martha-design-system.martha-client-secondary #view-governance .martha-governance-section-body {
  display: grid;
  gap: 14px;
  padding: 14px;
}
html body#martha-app.martha-design-system.martha-client-secondary #view-governance .martha-governance-section-body > .two-columns {
  margin: 0;
}
html body#martha-app.martha-design-system.martha-client-secondary #view-governance .martha-governance-section-body .panel {
  border: 1px solid #EDE4D3;
  border-radius: 15px;
  background: #FFFEFB;
  box-shadow: none;
}
html body#martha-app.martha-design-system.martha-client-secondary #view-governance .governance-record,
html body#martha-app.martha-design-system.martha-client-secondary #view-portfolio .portfolio-control-record {
  border: 1px solid #EDE4D3;
  border-radius: 13px;
  color: #2A2420;
  background: #FFFEFB;
}
html body#martha-app.martha-design-system.martha-client-secondary #view-portfolio .portfolio-tree-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 13px;
  border: 1px solid #E8DFCC;
  border-radius: 14px;
  background: #FBF7EE;
}
html body#martha-app.martha-design-system.martha-client-secondary #view-portfolio .portfolio-record {
  margin: 9px 0;
  border: 1px solid #E8DFCC;
  border-radius: 15px;
  color: #2A2420;
  background: #FFFEFB;
}
html body#martha-app.martha-design-system.martha-client-secondary #view-portfolio .portfolio-record > summary {
  min-height: 54px;
  gap: 10px;
  padding: 12px 15px;
  color: #6B4A1B;
  background: #FBF7EE;
}
html body#martha-app.martha-design-system.martha-client-secondary #view-portfolio .portfolio-record-body {
  border-top: 1px solid #E8DFCC;
}
html body#martha-app.martha-design-system.martha-client-secondary #view-incidents .health-card {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  padding: 22px;
}
html body#martha-app.martha-design-system.martha-client-secondary #view-incidents .health-card h3 {
  margin: 0 0 6px;
  color: #6B4A1B;
}
html body#martha-app.martha-design-system.martha-client-secondary #view-incidents .health-card .status-dot[data-state="success"] {
  background: #557A52;
  box-shadow: 0 0 0 5px #E9F0E4;
}
html body#martha-app.martha-design-system.martha-client-secondary #view-incidents .health-card .status-dot[data-state="warning"] {
  background: #B67A19;
  box-shadow: 0 0 0 5px #F8EFD9;
}
html body#martha-app.martha-design-system.martha-client-secondary :is(#view-overview, #view-portfolio, #view-incidents, #view-governance) :is(button, summary, input, select, textarea):focus-visible {
  outline: 3px solid rgba(191, 139, 49, .48);
  outline-offset: 2px;
}
@media (max-width: 700px) {
  html body#martha-app.martha-design-system.martha-client-secondary #view-governance .martha-governance-section-body { padding: 10px; }
  html body#martha-app.martha-design-system.martha-client-secondary #view-incidents .martha-health-section-body { padding: 10px; }
  html body#martha-app.martha-design-system.martha-client-secondary #view-portfolio .portfolio-tree-tools { display: grid; }
  html body#martha-app.martha-design-system.martha-client-secondary #view-portfolio .portfolio-record > summary { align-items: flex-start; flex-direction: column; }
  html body#martha-app.martha-design-system.martha-client-secondary #view-incidents .health-card { padding: 17px; }
}

html body#martha-app.martha-design-system.martha-client-secondary #view-manufacturing .martha-manufacturing-list-editor {
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 16px;
  border: 1px solid #E8DFCC;
  border-radius: 16px;
  background: linear-gradient(145deg, #FFFDF8, #FBF6EA);
}
html body#martha-app.martha-design-system.martha-client-secondary #view-manufacturing .martha-manufacturing-list-row {
  display: grid;
  gap: 12px;
  min-width: 0;
  margin: 0;
  padding: 14px;
  border: 1px solid #E8DFCC;
  border-radius: 14px;
  background: #FFFEFB;
}
html body#martha-app.martha-design-system.martha-client-secondary #view-manufacturing .martha-manufacturing-list-row legend {
  padding: 0 6px;
  color: #6B4A1B;
  font-weight: 650;
}
html body#martha-app.martha-design-system.martha-client-secondary #view-manufacturing .martha-manufacturing-list-row > strong {
  color: #3F3526;
}
html body#martha-app.martha-design-system.martha-client-secondary #view-manufacturing .martha-manufacturing-observation-row > span {
  color: #756B5A;
  font-size: 13px;
}
html body#martha-app.martha-design-system.martha-client-secondary #view-manufacturing .martha-manufacturing-checkbox {
  display: flex;
  align-items: center;
  gap: 9px;
}
html body#martha-app.martha-design-system.martha-client-secondary #view-manufacturing .martha-manufacturing-checkbox input {
  width: 18px;
  min-height: 18px;
  accent-color: #B78327;
}
html body#martha-app.martha-design-system.martha-client-secondary #view-manufacturing .martha-manufacturing-list-row select[multiple] {
  min-height: 88px;
}
html body#martha-app.martha-design-system.martha-client-secondary #view-manufacturing :is(.martha-manufacturing-list-editor, .martha-manufacturing-list-row) :is(input, select, textarea):focus-visible {
  outline: 3px solid rgba(191, 139, 49, .48);
  outline-offset: 2px;
}
html body#martha-app.martha-design-system.martha-client-secondary #view-manufacturing [data-manufacturing-list-remove]:disabled {
  opacity: .48;
  cursor: not-allowed;
}

/* VISUEL-05 — historique des discussions : recherche, titres courts et renommage. */
html body#martha-app.martha-design-system :is(.app-shell > .sidebar, #view-martha .martha-chat-sidebar) .martha-chat-history-search {
  display: block;
  margin: 0 0 6px;
}

html body#martha-app.martha-design-system :is(.app-shell > .sidebar, #view-martha .martha-chat-sidebar) .martha-chat-history-input {
  width: 100%;
  min-height: 40px;
  border: 1px solid #E8DFCC;
  border-radius: 7px;
  padding: 8px 10px;
  color: #2A2420;
  background: #FFFDF9;
  font-size: 13px;
}

html body#martha-app.martha-design-system :is(.app-shell > .sidebar, #view-martha .martha-chat-sidebar) .martha-client-conversation-list .martha-chat-conversation-row {
  display: flex;
  align-items: stretch;
  gap: 2px;
  min-width: 0;
}

html body#martha-app.martha-design-system :is(.app-shell > .sidebar, #view-martha .martha-chat-sidebar) .martha-client-conversation-list .martha-chat-conversation {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  min-width: 0;
  min-height: 44px;
  gap: 9px;
  margin: 0;
  padding: 6px 7px;
  border: 1px solid transparent;
  border-radius: 6px;
  color: #544B3E;
  background: transparent;
  text-align: left;
}

html body#martha-app.martha-design-system :is(.app-shell > .sidebar, #view-martha .martha-chat-sidebar) .martha-client-conversation-list .martha-chat-conversation:hover,
html body#martha-app.martha-design-system :is(.app-shell > .sidebar, #view-martha .martha-chat-sidebar) .martha-client-conversation-list .martha-chat-conversation.active {
  color: #392F21;
  background: #F5EFE3;
}

html body#martha-app.martha-design-system :is(.app-shell > .sidebar, #view-martha .martha-chat-sidebar) .martha-client-conversation-list .martha-chat-conversation::after {
  display: none !important;
  content: none !important;
}

html body#martha-app.martha-design-system :is(.app-shell > .sidebar, #view-martha .martha-chat-sidebar) .martha-chat-conversation-copy {
  display: grid;
  flex: 1 1 auto;
  min-width: 0;
}

html body#martha-app.martha-design-system :is(.app-shell > .sidebar, #view-martha .martha-chat-sidebar) .martha-chat-conversation-title {
  overflow: hidden;
  color: inherit;
  font-size: 12px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

html body#martha-app.martha-design-system :is(.app-shell > .sidebar, #view-martha .martha-chat-sidebar) .martha-client-conversation-list .martha-chat-conversation .martha-chat-conversation-meta {
  display: block;
  margin-top: 2px;
  color: #817667;
  font-size: 10px;
}

html body#martha-app.martha-design-system :is(.app-shell > .sidebar, #view-martha .martha-chat-sidebar) .martha-chat-conversation-rename {
  display: grid;
  flex: 0 0 44px;
  place-items: center;
  width: 44px;
  min-width: 44px;
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: 6px;
  color: #817667;
  background: transparent;
  cursor: pointer;
}

html body#martha-app.martha-design-system :is(.app-shell > .sidebar, #view-martha .martha-chat-sidebar) .martha-chat-conversation-rename:hover,
html body#martha-app.martha-design-system :is(.app-shell > .sidebar, #view-martha .martha-chat-sidebar) .martha-chat-conversation-rename:focus-visible {
  color: #54350C;
  background: #F5EFE3;
}

html body#martha-app.martha-design-system :is(.app-shell > .sidebar, #view-martha .martha-chat-sidebar) .martha-chat-conversation-rename svg {
  width: 16px;
  height: 16px;
}

/* VISUEL-06 — les pages métier annoncent leur utilité et les commandes
   indisponibles restent lisibles et expliquées. */
html body#martha-app.martha-design-system.martha-client-secondary button:disabled,
html body#martha-app.martha-design-system.martha-client-secondary [role="button"][aria-disabled="true"] {
  border-color: #E5DDCD !important;
  color: #756D61 !important;
  background: #F2EEE6 !important;
  box-shadow: none !important;
  opacity: 1 !important;
  cursor: not-allowed !important;
}

html body#martha-app.martha-design-system.martha-client-secondary button:disabled:hover,
html body#martha-app.martha-design-system.martha-client-secondary button:disabled:focus-visible,
html body#martha-app.martha-design-system.martha-client-secondary [role="button"][aria-disabled="true"]:hover,
html body#martha-app.martha-design-system.martha-client-secondary [role="button"][aria-disabled="true"]:focus-visible {
  border-color: #D6C9AF !important;
  color: #625747 !important;
  background: #EEE8DC !important;
}

@media (max-width: 700px) {
  html body#martha-app.martha-design-system.martha-client-secondary #view-manufacturing .martha-manufacturing-list-editor { padding: 12px; }
  html body#martha-app.martha-design-system.martha-client-secondary #view-manufacturing .martha-manufacturing-list-row { padding: 12px; }
}

/* MENU UNIQUE — le menu a la même apparence sur toutes les pages (chat comme
   pages métier). « Nouvelle discussion » est la première ligne du menu, au
   même format que les autres lignes (même hauteur, même police, même icône). */
html body#martha-app.martha-design-system :is(.martha-secondary-new, .martha-client-new-discussion) {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 9px !important;
  width: 100% !important;
  min-height: 36px !important;
  height: auto !important;
  margin: 0 0 2px !important;
  padding: 7px 10px !important;
  border: 1px solid transparent !important;
  border-radius: 5px !important;
  color: #54350C !important;
  background: transparent !important;
  box-shadow: none !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  line-height: 20px !important;
  text-align: left !important;
  transform: none !important;
}

html body#martha-app.martha-design-system :is(.martha-secondary-new, .martha-client-new-discussion):hover,
html body#martha-app.martha-design-system :is(.martha-secondary-new, .martha-client-new-discussion):focus-visible {
  border-color: transparent !important;
  color: #392F21 !important;
  background: #F5EFE3 !important;
  transform: none !important;
}

html body#martha-app.martha-design-system :is(.martha-secondary-new, .martha-client-new-discussion) svg {
  flex: 0 0 18px !important;
  width: 18px !important;
  height: 18px !important;
  color: #9B7B49 !important;
}

html body#martha-app.martha-design-system :is(.martha-secondary-new, .martha-client-new-discussion) span {
  color: inherit !important;
}

/* Garde-fou : aucun bloc de la page ne dépasse la largeur de l'écran. */
html body#martha-app .app-shell :is(.sidebar, .main, main, .view, .view.active-view, .panel, article, section, form) {
  min-width: 0;
  max-width: 100%;
}

@media (max-width: 1023px) {
  html body#martha-app.martha-design-system :is(.app-shell > .sidebar, #view-martha .martha-chat-sidebar) {
    width: min(280px, 88vw) !important;
  }
}

html body#martha-app.martha-design-system :is(.martha-chat-command-search, .martha-secondary-command-search) {
  width: 100% !important;
  box-sizing: border-box;
}

html body#martha-app.martha-design-system .martha-client-sidebar-heading {
  margin: 0 !important;
  padding: 0 !important;
}

html body#martha-app.martha-design-system :is(.martha-secondary-heading, .martha-client-sidebar-heading h2) {
  white-space: nowrap;
}

html body#martha-app.martha-design-system :is(.martha-client-profile, .martha-secondary-profile) > span:nth-child(2) {
  min-width: 0;
  flex: 1 1 auto;
}

html body#martha-app.martha-design-system :is(.martha-client-profile, .martha-secondary-profile) small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

html body#martha-app.martha-design-system :is(.app-shell > .sidebar, #view-martha .martha-chat-sidebar, .martha-sidebar-scroll) {
  scrollbar-width: thin;
  scrollbar-color: #E4D3AE transparent;
}

/* Keep the chat composer inside the visible phone viewport when the keyboard opens. */
html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-main {
  top: var(--martha-chat-visible-offset-top, 0px) !important;
  right: 0 !important;
  bottom: auto !important;
  left: 0 !important;
  height: var(--martha-chat-visible-height, 100dvh) !important;
  min-height: 0 !important;
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-feed {
  overscroll-behavior-y: contain;
  -webkit-overflow-scrolling: touch;
}

/* Keep the web-research confirmation consistent with Martha's cream-and-gold interface. */
html body#martha-app.martha-design-system dialog.martha-web-note-dialog {
  border: 1px solid #dfc58c;
  color: #32291f;
  background: #fffaf0;
  box-shadow: 0 24px 70px rgba(44, 31, 12, .3);
}
html body#martha-app.martha-design-system dialog.martha-web-note-dialog::backdrop { background: rgba(48, 39, 27, .32); backdrop-filter: blur(4px); }
html body#martha-app.martha-design-system dialog.martha-web-note-dialog .martha-dialog-heading h2 { color: #32291f; }
html body#martha-app.martha-design-system dialog.martha-web-note-dialog .martha-dialog-heading p:not(.martha-cockpit-eyebrow) { color: #736958; }
html body#martha-app.martha-design-system dialog.martha-web-note-dialog .martha-cockpit-eyebrow { color: #99702c; }
html body#martha-app.martha-design-system dialog.martha-web-note-dialog .martha-dialog-close { color: #736958; }
html body#martha-app.martha-design-system dialog.martha-web-note-dialog label { color: #615640; }
html body#martha-app.martha-design-system dialog.martha-web-note-dialog textarea,
html body#martha-app.martha-design-system dialog.martha-web-note-dialog select { border-color: #dfd0b2; color: #32291f; background: #fffdf8; }
html body#martha-app.martha-design-system dialog.martha-web-note-dialog .martha-dialog-secondary { border-color: #e4d5b9; color: #665333; background: #f8f1e3; }
html body#martha-app.martha-design-system dialog.martha-web-note-dialog .martha-dialog-primary { border-color: #ca9d4a; color: #3f2e0e !important; background: linear-gradient(180deg, #f9d991, #e5b85e) !important; }
html body#martha-app.martha-design-system dialog.martha-web-note-dialog .martha-web-note-disclosure { border: 1px solid #e4d5b9; color: #736958; background: #f8f1e3; }
html body#martha-app.martha-design-system dialog.martha-web-note-dialog .martha-web-note-status { color: #736958; }

/* Vague 8 — personnalisation privée du chat. Les contrôles gardent leur taille;
   seule la lecture du contenu suit le réglage de texte choisi sur l’appareil. */
html[data-martha-text-scale="90"] { --martha-chat-text-scale: .9; }
html[data-martha-text-scale="100"] { --martha-chat-text-scale: 1; }
html[data-martha-text-scale="110"] { --martha-chat-text-scale: 1.1; }
html[data-martha-text-scale="125"] { --martha-chat-text-scale: 1.25; }
html body#martha-app.martha-client-chat #view-martha .martha-chat-feed .martha-chat-message-bubble,
html body#martha-app.martha-client-chat #view-martha .martha-chat-feed .martha-chat-empty-state,
html body#martha-app.martha-client-chat #view-martha .martha-chat-current-copy > :is(h1, p) {
  font-size: calc(1em * var(--martha-chat-text-scale, 1));
}
html body#martha-app.martha-client-chat :is(.martha-chat-preferences-dialog, .martha-chat-projects-dialog) {
  font-size: calc(1rem * var(--martha-chat-text-scale, 1));
}
html[data-martha-high-contrast="true"] body#martha-app.martha-client-chat {
  --martha-chat-access-ink: #17120a;
  --martha-chat-access-muted: #51432f;
  --martha-chat-access-line: #8b6b36;
}
html[data-martha-high-contrast="true"] body#martha-app.martha-client-chat #view-martha .martha-chat-feed,
html[data-martha-high-contrast="true"] body#martha-app.martha-client-chat #view-martha .martha-chat-feed :is(.martha-chat-message-bubble, .martha-chat-empty-state) {
  color: var(--martha-chat-access-ink) !important;
}
html[data-martha-high-contrast="true"] body#martha-app.martha-client-chat #view-martha .martha-chat-feed :is(.martha-chat-message-bubble, .martha-chat-action-proposal, .martha-chat-empty-state),
html[data-martha-high-contrast="true"] body#martha-app.martha-client-chat :is(.martha-chat-preferences-dialog, .martha-chat-projects-dialog) {
  border-color: var(--martha-chat-access-line) !important;
}
html[data-martha-high-contrast="true"] body#martha-app.martha-client-chat #view-martha .martha-chat-feed :is(.martha-chat-message-meta, .martha-chat-message-label, .martha-chat-empty-state span) {
  color: var(--martha-chat-access-muted) !important;
}
html[data-martha-theme="dark"] body#martha-app.martha-client-chat,
html[data-martha-theme="dark"] body#martha-app.martha-client-chat .app-shell,
html[data-martha-theme="dark"] body#martha-app.martha-client-chat #view-martha.active-view,
html[data-martha-theme="dark"] body#martha-app.martha-client-chat #view-martha .martha-chat-view,
html[data-martha-theme="dark"] body#martha-app.martha-client-chat #view-martha .martha-chat-shell,
html[data-martha-theme="dark"] body#martha-app.martha-client-chat #view-martha .martha-chat-main {
  --martha-chat-user-bg: #201d19;
  --martha-chat-user-panel: #29251f;
  --martha-chat-user-raised: #302b24;
  --martha-chat-user-ink: #f4efe5;
  --martha-chat-user-muted: #c1b49d;
  --martha-chat-user-line: #66553b;
  color: var(--martha-chat-user-ink) !important;
  background: var(--martha-chat-user-bg) !important;
}
html[data-martha-theme="dark"] body#martha-app.martha-client-chat #view-martha :is(.martha-client-mobile-header, .martha-chat-current-toolbar, .martha-chat-sidebar, .martha-chat-rail),
html[data-martha-theme="dark"] body#martha-app.martha-client-chat #view-martha .martha-chat-composer,
html[data-martha-theme="dark"] body#martha-app.martha-client-chat #view-martha .martha-chat-feed .martha-chat-message.assistant .martha-chat-message-bubble,
html[data-martha-theme="dark"] body#martha-app.martha-client-chat :is(.martha-chat-preferences-dialog, .martha-chat-projects-dialog) {
  border-color: var(--martha-chat-user-line) !important;
  color: var(--martha-chat-user-ink) !important;
  background: var(--martha-chat-user-panel) !important;
}
html[data-martha-theme="dark"] body#martha-app.martha-client-chat #view-martha :is(.martha-chat-conversation, .martha-chat-current-project, .martha-chat-feed .martha-chat-message.user .martha-chat-message-bubble) {
  border-color: var(--martha-chat-user-line) !important;
  color: var(--martha-chat-user-ink) !important;
  background: var(--martha-chat-user-raised) !important;
}
html[data-martha-theme="dark"] body#martha-app.martha-client-chat #view-martha :is(.martha-chat-current-copy, .martha-chat-current-copy h1, .martha-chat-current-copy p, .martha-chat-feed, .martha-chat-feed :is(p, li, h1, h2, h3, strong, small, .martha-chat-message-bubble), .martha-chat-sidebar, .martha-chat-sidebar :is(h1, h2, h3, p, small, label, strong), .martha-chat-preferences-dialog :is(h1, h2, h3, p, small, label, legend, strong), .martha-chat-projects-dialog :is(h1, h2, h3, h4, p, small, label, legend, strong)) {
  color: var(--martha-chat-user-ink) !important;
}
html[data-martha-theme="dark"] body#martha-app.martha-client-chat :is(.martha-chat-preferences-dialog, .martha-chat-projects-dialog) :is(input:not([type="checkbox"]), select, textarea) {
  border-color: var(--martha-chat-user-line) !important;
  color: var(--martha-chat-user-ink) !important;
  background: #1b1916 !important;
}
html[data-martha-theme="dark"] body#martha-app.martha-client-chat :is(.martha-chat-preferences-dialog, .martha-chat-projects-dialog) .martha-chat-preference-note,
html[data-martha-theme="dark"] body#martha-app.martha-client-chat #view-martha .martha-chat-feed :is(.martha-chat-message-meta, .martha-chat-message-label) {
  color: var(--martha-chat-user-muted) !important;
}
@media (prefers-color-scheme: dark) {
  html[data-martha-theme="system"] body#martha-app.martha-client-chat,
  html[data-martha-theme="system"] body#martha-app.martha-client-chat .app-shell,
  html[data-martha-theme="system"] body#martha-app.martha-client-chat #view-martha.active-view,
  html[data-martha-theme="system"] body#martha-app.martha-client-chat #view-martha .martha-chat-view,
  html[data-martha-theme="system"] body#martha-app.martha-client-chat #view-martha .martha-chat-shell,
  html[data-martha-theme="system"] body#martha-app.martha-client-chat #view-martha .martha-chat-main {
    --martha-chat-user-bg: #201d19;
    --martha-chat-user-panel: #29251f;
    --martha-chat-user-raised: #302b24;
    --martha-chat-user-ink: #f4efe5;
    --martha-chat-user-muted: #c1b49d;
    --martha-chat-user-line: #66553b;
    color: var(--martha-chat-user-ink) !important;
    background: var(--martha-chat-user-bg) !important;
  }
  html[data-martha-theme="system"] body#martha-app.martha-client-chat #view-martha :is(.martha-client-mobile-header, .martha-chat-current-toolbar, .martha-chat-sidebar, .martha-chat-rail, .martha-chat-composer, .martha-chat-feed .martha-chat-message.assistant .martha-chat-message-bubble),
  html[data-martha-theme="system"] body#martha-app.martha-client-chat :is(.martha-chat-preferences-dialog, .martha-chat-projects-dialog) {
    border-color: var(--martha-chat-user-line) !important;
    color: var(--martha-chat-user-ink) !important;
    background: var(--martha-chat-user-panel) !important;
  }
  html[data-martha-theme="system"] body#martha-app.martha-client-chat #view-martha :is(.martha-chat-conversation, .martha-chat-current-project, .martha-chat-feed .martha-chat-message.user .martha-chat-message-bubble) {
    border-color: var(--martha-chat-user-line) !important;
    color: var(--martha-chat-user-ink) !important;
    background: var(--martha-chat-user-raised) !important;
  }
  html[data-martha-theme="system"] body#martha-app.martha-client-chat #view-martha :is(.martha-chat-current-copy, .martha-chat-current-copy h1, .martha-chat-current-copy p, .martha-chat-feed, .martha-chat-feed :is(p, li, h1, h2, h3, strong, small, .martha-chat-message-bubble), .martha-chat-sidebar :is(h1, h2, h3, p, small, label, strong), .martha-chat-preferences-dialog :is(h1, h2, h3, p, small, label, legend, strong), .martha-chat-projects-dialog :is(h1, h2, h3, h4, p, small, label, legend, strong)) { color: var(--martha-chat-user-ink) !important; }
  html[data-martha-theme="system"] body#martha-app.martha-client-chat :is(.martha-chat-preferences-dialog, .martha-chat-projects-dialog) :is(input:not([type="checkbox"]), select, textarea) { border-color: var(--martha-chat-user-line) !important; color: var(--martha-chat-user-ink) !important; background: #1b1916 !important; }
  html[data-martha-theme="system"] body#martha-app.martha-client-chat :is(.martha-chat-preferences-dialog, .martha-chat-projects-dialog) .martha-chat-preference-note,
  html[data-martha-theme="system"] body#martha-app.martha-client-chat #view-martha .martha-chat-feed :is(.martha-chat-message-meta, .martha-chat-message-label) { color: var(--martha-chat-user-muted) !important; }
}
html body#martha-app.martha-client-chat .martha-chat-project-current { display: inline-flex; align-items: center; gap: 6px; min-width: 0; max-width: 200px; margin: 0 10px; padding: 5px 9px; overflow: hidden; border: 1px solid #E8DFCC; border-radius: 999px; color: #6B4A1B; background: #FFFDF9; font: inherit; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
html body#martha-app.martha-client-chat .martha-chat-project-current > span:last-child { overflow: hidden; text-overflow: ellipsis; }
html body#martha-app.martha-client-chat .martha-chat-project-current:disabled { opacity: .58; cursor: not-allowed; }
html body#martha-app.martha-client-chat .martha-chat-display-preferences { display: grid; gap: 11px; min-width: 0; margin: 0; border: 1px solid #E6D8BA; border-radius: 12px; padding: 12px; }
html body#martha-app.martha-client-chat .martha-chat-display-preferences legend { padding: 0 5px; font-weight: 700; }
html body#martha-app.martha-client-chat .martha-chat-projects-actions { display: flex; justify-content: flex-start; }
html body#martha-app.martha-client-chat .martha-chat-project-content,
html body#martha-app.martha-client-chat .martha-chat-project-sharing { display: grid; gap: 6px; min-width: 0; border-top: 1px solid #E6D8BA; padding-top: 12px; }
html body#martha-app.martha-client-chat .martha-chat-project-content h3,
html body#martha-app.martha-client-chat .martha-chat-project-sharing h3 { margin: 0; font-size: 14px; }
html body#martha-app.martha-client-chat .martha-chat-project-content h4 { margin: 4px 0 0; font-size: 12px; }
html body#martha-app.martha-client-chat .martha-chat-project-content :is(ul, p) { margin: 0; padding-left: 18px; color: #625C52; font-size: 12px; line-height: 1.45; overflow-wrap: anywhere; }
html body#martha-app.martha-client-chat .martha-chat-project-sharing p { margin: 0; color: #625C52; font-size: 12px; line-height: 1.45; }
html body#martha-app.martha-client-chat .martha-chat-project-sharing button:disabled { border-color: #D9CBAE; color: #66583F; background: #F3EBD9; opacity: 1; cursor: not-allowed; }
html[data-martha-theme="dark"] body#martha-app.martha-client-chat :is(.martha-chat-preferences-dialog, .martha-chat-projects-dialog) button:not(.primary) { border-color: #66553B; color: #F4EFE5; background: #40382C; }
html[data-martha-theme="dark"] body#martha-app.martha-client-chat .martha-chat-project-sharing button:disabled { border-color: #66553B; color: #E3D6BD; background: #40382C; }
@media (prefers-color-scheme: dark) {
  html[data-martha-theme="system"] body#martha-app.martha-client-chat :is(.martha-chat-preferences-dialog, .martha-chat-projects-dialog) button:not(.primary) { border-color: #66553B; color: #F4EFE5; background: #40382C; }
  html[data-martha-theme="system"] body#martha-app.martha-client-chat .martha-chat-project-sharing button:disabled { border-color: #66553B; color: #E3D6BD; background: #40382C; }
}
@media (max-width: 640px) {
  html body#martha-app.martha-client-chat .martha-chat-project-current { max-width: 118px; margin: 0 4px; padding: 4px 6px; font-size: 10px; }
  html body#martha-app.martha-client-chat .martha-chat-current-toolbar { gap: 3px; }
  html body#martha-app.martha-client-chat .martha-chat-projects-dialog { max-height: 86dvh; }
}

/* Vague 6 — actions de message, aperçus sans effet extérieur et copie de tableaux. */
html body#martha-app.martha-design-system #view-martha .martha-chat-message-action-list { display: contents; }
html body#martha-app.martha-design-system #view-martha .martha-chat-actions-toggle { display: none; }
html body#martha-app.martha-design-system #view-martha .martha-chat-table-card { max-width: 100%; margin: 10px 0 12px; overflow: hidden; border: 1px solid #E8DFCC; border-radius: 12px; background: #FFFDF9; }
html body#martha-app.martha-design-system #view-martha .martha-chat-table-tools { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 5px 8px; border-bottom: 1px solid #E8DFCC; color: #75664F; font-size: 11px; }
html body#martha-app.martha-design-system #view-martha .martha-chat-table-tools .martha-chat-message-action { height: 26px; padding: 0 8px; border: 1px solid #E8DFCC; border-radius: 7px; color: #655B4E; background: #FAF6EE; font-size: 11px; }
html body#martha-app.martha-design-system #view-martha .martha-chat-table-wrap { margin: 0; overflow: auto; border: 0; border-radius: 0; }
html body#martha-app.martha-design-system dialog.martha-message-action-dialog { width: min(560px, calc(100vw - 28px)); max-height: min(82vh, 760px); overflow: auto; border: 1px solid #E8DFCC; border-radius: 16px; padding: 18px; color: #2A2420; background: #FFFDF9; box-shadow: 0 18px 70px rgba(48, 36, 16, .2); }
html body#martha-app.martha-design-system dialog.martha-message-action-dialog::backdrop { background: rgba(38, 32, 25, .42); }
html body#martha-app.martha-design-system dialog.martha-message-action-dialog .martha-dialog-heading { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
html body#martha-app.martha-design-system dialog.martha-message-action-dialog h2 { margin: 0; color: #2A2420; font-size: 20px; line-height: 1.25; }
html body#martha-app.martha-design-system dialog.martha-message-action-dialog p { color: #655B4E; font-size: 13px; line-height: 1.55; }
html body#martha-app.martha-design-system dialog.martha-message-action-dialog .martha-message-action-preview { max-height: 38vh; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; border: 1px solid #E8DFCC; border-radius: 10px; padding: 11px; color: #2A2420; background: #FAF6EE; font: inherit; font-size: 13px; line-height: 1.55; }
html body#martha-app.martha-design-system dialog.martha-message-action-dialog fieldset { display: grid; gap: 7px; border: 0; padding: 0; }
html body#martha-app.martha-design-system dialog.martha-message-action-dialog legend { margin-bottom: 7px; color: #2A2420; font-size: 13px; font-weight: 650; }
html body#martha-app.martha-design-system dialog.martha-message-action-dialog .martha-message-action-choice { display: flex; gap: 9px; align-items: center; border: 1px solid #E8DFCC; border-radius: 9px; padding: 8px 10px; color: #2A2420; background: #FFFDF9; font-size: 13px; }
html body#martha-app.martha-design-system dialog.martha-message-action-dialog .martha-message-action-choice input { accent-color: #B4822F; }
html body#martha-app.martha-design-system dialog.martha-message-action-dialog button:disabled { opacity: .55; cursor: not-allowed; }
html body#martha-app.martha-design-system dialog.martha-message-action-dialog .martha-message-action-disabled { height: 26px; padding: 0 10px; border: 1px solid #E8DFCC; border-radius: 999px; color: #75664F; background: #F5F0E6; font-size: 11px; }
html body#martha-app.martha-design-system #view-martha .martha-chat-message.is-actions-open .martha-chat-message-actions { opacity: 1; }
@media (max-width: 760px) and (hover: none) {
  html body#martha-app.martha-design-system #view-martha .martha-chat-message-actions { flex-wrap: wrap; align-items: center; opacity: 1; }
  html body#martha-app.martha-design-system #view-martha .martha-chat-actions-toggle { display: inline-flex; justify-content: center; align-items: center; width: 34px; height: 26px; padding: 0 5px; border: 1px solid #EDE3D1; border-radius: 999px; background: #FFFDF9; }
  html body#martha-app.martha-design-system #view-martha .martha-chat-message-action-list { display: none; flex: 1 1 100%; flex-wrap: wrap; gap: 4px; }
  html body#martha-app.martha-design-system #view-martha .martha-chat-message.is-actions-open .martha-chat-message-action-list { display: flex; }
  html body#martha-app.martha-design-system #view-martha .martha-chat-message-action-list .martha-chat-message-action { height: 26px; max-width: 100%; padding: 0 8px; font-size: 11px; }
}

/* Choix du périmètre au début d'une nouvelle discussion. */
html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-scope-required .martha-chat-composer-wrap { display: none !important; }
html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-scope-required .martha-cockpit-welcome { display: none !important; }
html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-scope-required .martha-chat-feed {
  display: flex !important;
  flex: 1 1 auto;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: auto;
  min-height: 0;
  margin: 0;
  padding: 24px clamp(14px, 4vw, 36px);
  overflow-x: hidden;
  overflow-y: auto;
  box-sizing: border-box;
}
html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-scope-start {
  width: min(100%, 590px);
  min-width: 0;
  margin: auto;
  padding: clamp(18px, 4vw, 30px);
  border: 1px solid var(--martha-ref-border, #E8DFCC);
  border-radius: 22px;
  color: var(--martha-ref-foreground, #32291F);
  background: var(--martha-ref-card, #FFFCF5);
  box-shadow: 0 12px 34px rgba(85, 61, 20, .08);
  text-align: center;
}
html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-scope-start-brand { display: grid; place-items: center; width: 52px; height: 52px; margin: 0 auto 12px; overflow: hidden; border: 1px solid #E8DFCC; border-radius: 16px; background: #FFFDF8; }
html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-scope-start-brand img { display: block; width: 46px; height: 46px; object-fit: contain; }
html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-scope-start-eyebrow { margin: 0 0 6px; color: #9A742F; font: 650 10px/15px var(--martha-ref-sans); letter-spacing: .12em; }
html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-scope-start h2 { margin: 0; color: var(--martha-ref-foreground, #32291F); font: 600 clamp(20px, 4vw, 26px)/1.2 var(--martha-ref-sans); overflow-wrap: anywhere; }
html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-scope-start-intro { max-width: 440px; margin: 9px auto 18px; color: var(--martha-ref-muted-foreground, #75664F); font: 400 13px/1.5 var(--martha-ref-sans); }
html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-scope-start-choices { display: grid; gap: 9px; width: 100%; min-width: 0; text-align: left; }
html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-scope-start-choice { display: grid; grid-template-columns: 38px minmax(0, 1fr) 18px; align-items: center; gap: 10px; width: 100%; min-width: 0; min-height: 62px; padding: 10px 12px; border: 1px solid var(--martha-ref-border, #E8DFCC); border-radius: 13px; color: var(--martha-ref-foreground, #32291F); background: var(--martha-ref-background, #FFFEFA); text-align: left; font: inherit; cursor: pointer; transition: border-color .16s ease, background-color .16s ease, box-shadow .16s ease; }
html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-scope-start-choice:hover { border-color: #D6B56F; background: var(--martha-ref-accent, #FAF3E5); box-shadow: 0 4px 14px rgba(119, 82, 21, .09); }
html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-scope-start-choice:focus-visible { outline: 2px solid #B58A45; outline-offset: 2px; }
html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-scope-start-choice:disabled { opacity: .62; cursor: not-allowed; }
html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-scope-start-icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 11px; color: #795620; background: #F7EEDB; }
html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-scope-start-icon svg { width: 19px; height: 19px; }
html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-scope-start-copy { display: grid; gap: 3px; min-width: 0; }
html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-scope-start-copy strong { overflow-wrap: anywhere; color: var(--martha-ref-foreground, #32291F); font: 600 14px/18px var(--martha-ref-sans); }
html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-scope-start-copy small { overflow-wrap: anywhere; color: var(--martha-ref-muted-foreground, #75664F); font: 400 11px/15px var(--martha-ref-sans); }
html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-scope-start-arrow { color: #A77A2D; font: 400 24px/1 var(--martha-ref-sans); text-align: center; }
html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-scope-start-status,
html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-scope-start-note { margin: 12px 0 0; color: var(--martha-ref-muted-foreground, #75664F); font: 400 12px/1.45 var(--martha-ref-sans); }
html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-scope-request { display: grid; gap: 8px; width: 100%; min-width: 0; margin-top: 10px; }
html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-scope-request-panel:not([hidden]) { display: grid; justify-items: start; gap: 7px; width: 100%; min-width: 0; box-sizing: border-box; padding: 10px; border: 1px solid var(--martha-ref-border, #E8DFCC); border-radius: 12px; background: var(--martha-ref-background, #FFFEFA); text-align: left; }
html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-scope-request-panel label { color: var(--martha-ref-foreground, #32291F); font: 600 12px/1.4 var(--martha-ref-sans); text-align: left; }
html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-scope-request-panel textarea { display: block; width: 100%; max-width: 100%; min-width: 0; min-height: 68px; box-sizing: border-box; padding: 8px 10px; border: 1px solid var(--martha-ref-border, #E8DFCC); border-radius: 9px; color: var(--martha-ref-foreground, #32291F); background: var(--martha-ref-card, #FFFCF5); font: 400 12px/1.45 var(--martha-ref-sans); resize: vertical; }
html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-scope-request-panel .text-button { justify-self: start; }
html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-scope-request-panel p { margin: 0; color: var(--martha-ref-muted-foreground, #75664F); font: 400 11px/1.45 var(--martha-ref-sans); text-align: left; }
html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-scope-required .martha-chat-current-toolbar { flex: 0 0 42px; min-height: 42px; }
html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-scope-required .martha-chat-current-actions-toggle { display: none; }
@media (max-width: 520px) {
  html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-main::before { width: min(390px, 100vw); right: 0; }
  html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-scope-required .martha-chat-feed { padding: 14px 12px 20px; }
  html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-scope-start { padding: 18px 14px; border-radius: 18px; }
  html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-scope-start-brand { width: 44px; height: 44px; margin-bottom: 9px; border-radius: 13px; }
  html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-scope-start-brand img { width: 40px; height: 40px; }
  html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-scope-start-intro { margin: 7px auto 13px; font-size: 12px; }
  html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-scope-start-choices { gap: 7px; }
  html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-scope-start-choice { grid-template-columns: 34px minmax(0, 1fr) 14px; gap: 8px; min-height: 58px; padding: 8px; }
  html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-scope-start-icon { width: 32px; height: 32px; }
  html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-scope-start-copy strong { font-size: 13px; }
  html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-scope-start-copy small { font-size: 10px; }
}

/* Le bandeau de démo occupe 50 px au-dessus du chat ; garder le composeur visible dessous. */
html body#martha-app.martha-design-system.martha-client-chat.martha-demo-mode #view-martha .martha-chat-main {
  height: calc(var(--martha-chat-visible-height, 100dvh) - 50px) !important;
}

/* Human review for additive document sensitivity proposals. */
html body#martha-app.martha-design-system.martha-client-secondary #document-sensitivity-review[hidden],
html body#martha-app.martha-design-system.martha-client-secondary [data-document-code-field][hidden] { display: none !important; }
html body#martha-app.martha-design-system.martha-client-secondary #document-sensitivity-review:not([hidden]) { display: grid; gap: 14px; border: 1px solid #E8DFCC; border-radius: 20px; padding: 18px; color: #2A2420; background: #FFFDF8; }
html body#martha-app.martha-design-system.martha-client-secondary #document-sensitivity-proposals { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 12px; min-width: 0; }
html body#martha-app.martha-design-system.martha-client-secondary .document-sensitivity-proposal { display: grid; align-content: start; gap: 10px; min-width: 0; border: 1px solid #E8DFCC; border-radius: 16px; padding: 14px; background: #FFFEFB; }
html body#martha-app.martha-design-system.martha-client-secondary .document-sensitivity-proposal h4,
html body#martha-app.martha-design-system.martha-client-secondary .document-sensitivity-proposal p { margin: 0; overflow-wrap: anywhere; }
html body#martha-app.martha-design-system.martha-client-secondary .document-sensitivity-proposal-heading,
html body#martha-app.martha-design-system.martha-client-secondary .document-sensitivity-proposal-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
html body#martha-app.martha-design-system.martha-client-secondary .document-sensitivity-level { margin-left: auto; color: #766037; font-size: 12px; }
html body#martha-app.martha-design-system.martha-client-secondary .document-sensitivity-proposal label,
html body#martha-app.martha-design-system.martha-client-secondary .document-sensitivity-code-field { display: grid; gap: 6px; min-width: 0; }
html body#martha-app.martha-design-system.martha-client-secondary .document-sensitivity-proposal select,
html body#martha-app.martha-design-system.martha-client-secondary .document-sensitivity-code-field input { width: 100%; min-width: 0; }
html body#martha-app.martha-design-system.martha-client-secondary #document-sensitivity-approve-all { justify-self: start; }
html body#martha-app.martha-design-system.martha-client-secondary #document-sensitivity-review-status { min-height: 1.2em; margin: 0; }
@media (max-width: 620px) {
  html body#martha-app.martha-design-system.martha-client-secondary #document-sensitivity-review:not([hidden]) { padding: 14px; }
  html body#martha-app.martha-design-system.martha-client-secondary .document-sensitivity-proposal { padding: 12px; }
  html body#martha-app.martha-design-system.martha-client-secondary .document-sensitivity-proposal-actions > button { max-width: 100%; white-space: normal; }
}

/* Local content search in the Documents workspace. */
html body#martha-app.martha-design-system.martha-client-secondary #documents-workspace .documents-content-search-panel { display: grid; gap: 12px; min-width: 0; border: 1px solid #E8DFCC; border-radius: 20px; padding: 18px; color: #2A2420; background: #FFFDF8; }
html body#martha-app.martha-design-system.martha-client-secondary #documents-workspace .documents-content-search-form { display: grid; gap: 8px; min-width: 0; }
html body#martha-app.martha-design-system.martha-client-secondary #documents-workspace .documents-content-search-form > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px; min-width: 0; }
html body#martha-app.martha-design-system.martha-client-secondary #documents-workspace .documents-content-search-form input { width: 100%; min-width: 0; }
html body#martha-app.martha-design-system.martha-client-secondary #documents-workspace .documents-content-search-results { display: grid; gap: 10px; min-width: 0; }
html body#martha-app.martha-design-system.martha-client-secondary #documents-workspace .documents-content-result { display: grid; gap: 7px; min-width: 0; border: 1px solid #E8DFCC; border-radius: 14px; padding: 12px 14px; background: #FFFEFB; }
html body#martha-app.martha-design-system.martha-client-secondary #documents-workspace .documents-content-result-heading { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 12px; min-width: 0; }
html body#martha-app.martha-design-system.martha-client-secondary #documents-workspace .documents-content-result h4,
html body#martha-app.martha-design-system.martha-client-secondary #documents-workspace .documents-content-result p { min-width: 0; margin: 0; overflow-wrap: anywhere; }
html body#martha-app.martha-design-system.martha-client-secondary #documents-workspace .documents-content-result p { white-space: pre-wrap; }
html body#martha-app.martha-design-system.martha-client-secondary #documents-workspace .documents-content-result small,
html body#martha-app.martha-design-system.martha-client-secondary #documents-workspace .documents-content-result-heading > span { color: #766037; font-size: 12px; }
html body#martha-app.martha-design-system.martha-client-secondary #documents-workspace #documents-content-search-status { min-height: 1.2em; margin: 0; }
@media (max-width: 620px) {
  html body#martha-app.martha-design-system.martha-client-secondary #documents-workspace .documents-content-search-panel { padding: 14px; }
  html body#martha-app.martha-design-system.martha-client-secondary #documents-workspace .documents-content-search-form > div { grid-template-columns: minmax(0, 1fr); }
  html body#martha-app.martha-design-system.martha-client-secondary #documents-workspace .documents-content-search-form button { justify-self: start; }
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-scope-chip-line { margin: 0; padding: 8px 12px; text-align: center; }
html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-scope-chip { min-height: 32px; padding: 4px 12px; border: 1px solid var(--line, #d9dde3); border-radius: 999px; background: transparent; color: inherit; font: inherit; font-size: 13px; cursor: pointer; }
