/* Martha reference presentation owner — P1-10.
 * Measured from the rendered v0 DOM. Business grids and data remain in their
 * existing owners. Specificity replaces the legacy ID/!important cockpit skin.
 */
@font-face { font-family: Geist; font-style: normal; font-weight: 100 900; font-display: swap; src: url('/assets/fonts/geist-latin.woff2') format('woff2'); }
@font-face { font-family: 'Instrument Serif'; font-style: normal; font-weight: 400; font-display: swap; src: url('/assets/fonts/instrument-serif-latin.woff2') format('woff2'); }
:root {
  color-scheme: light;
  --martha-ref-background: #FBFAF7;
  --martha-ref-foreground: #2A2420;
  --martha-ref-card: #FFFDF9;
  --martha-ref-popover: #FFFDF9;
  --martha-ref-elevated: #F5EEE0;
  --martha-ref-muted-foreground: #817667;
  --martha-ref-accent: #F8F0E2;
  --martha-ref-border: #E8DFCC;
  --martha-ref-input: #E8D5AC;
  --martha-ref-ring: #D1A04E;
  --martha-ref-sidebar: #FFFDF9;
  --martha-ref-destructive: #A85A4C;
  --martha-ref-gold: #A86D1D;
  --martha-ref-gold-bright: #E8B84F;
  --martha-ref-sans: Geist, ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --martha-ref-serif: 'Instrument Serif', Georgia, serif;
  --martha-ds-bg: var(--martha-ref-background);
  --martha-ds-bg-raised: var(--martha-ref-card);
  --martha-ds-surface: var(--martha-ref-card);
  --martha-ds-surface-raised: var(--martha-ref-elevated);
  --martha-ds-surface-hover: var(--martha-ref-accent);
  --martha-ds-ink-strong: var(--martha-ref-foreground);
  --martha-ds-ink: var(--martha-ref-foreground);
  --martha-ds-ink-soft: var(--martha-ref-muted-foreground);
  --martha-ds-muted: var(--martha-ref-muted-foreground);
  --martha-ds-faint: var(--martha-ref-muted-foreground);
  --martha-ds-line: var(--martha-ref-border);
  --martha-ds-line-strong: oklch(1 0 0 / 25%);
  --martha-ds-red: var(--martha-ref-destructive);
  --martha-ds-focus: 0 0 0 3px var(--martha-ref-ring);
}
html { background: var(--martha-ref-background); scrollbar-color: #333 transparent; }
html body#martha-app.martha-design-system { margin: 0; padding: 0; background: var(--martha-ref-background) !important; color: var(--martha-ref-foreground); font-family: var(--martha-ref-sans); font-size: 14px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
html body#martha-app.martha-design-system :is(h1,h2,h3,h4,h5,h6,p,b,strong,small,span,label,summary,button,input,textarea,select,th,td,dt,dd) { font-family: var(--martha-ref-sans) !important; }
html body#martha-app.martha-design-system :is(h1,h2,h3,h4) { letter-spacing: -.02em; font-weight: 500; }
html body#martha-app.martha-design-system :is(button,input,select,textarea) { font-size: 14px; }
html body#martha-app.martha-design-system :is(button,a,input,select,textarea,summary):focus-visible { outline: 2px solid var(--martha-ref-ring); outline-offset: 3px; }
html body#martha-app.martha-design-system [hidden] { display: none !important; }
html body#martha-app.martha-design-system :is(button,summary) { touch-action: manipulation; }
html body#martha-app.martha-design-system button:disabled { cursor: not-allowed; opacity: .45; }

/* Full-bleed shell; scrolling belongs to the application, not the document. */
html body#martha-app.martha-design-system .app-shell { width: 100%; max-width: none; height: 100dvh; min-height: 0; margin: 0 !important; padding: 0; border: 0 !important; border-radius: 0 !important; background: var(--martha-ref-background); box-shadow: none; overflow: hidden; }
html body#martha-app.martha-design-system.martha-client-secondary .app-shell { display: grid; grid-template-columns: 280px minmax(0, 1fr); }
html body#martha-app.martha-design-system.martha-client-chat .app-shell { display: block; }
html body#martha-app.martha-design-system .app-shell > .main { width: 100%; min-width: 0; height: 100dvh; min-height: 0; margin: 0; padding: 0 !important; overflow: auto; background: var(--martha-ref-background); }
html body#martha-app.martha-client-chat .app-shell > .sidebar,
html body#martha-app.martha-client-chat .app-shell > .main > .topbar { display: none !important; }
html body#martha-app.martha-design-system #view-martha.active-view { width: 100%; max-width: none; height: 100dvh; min-height: 0; margin: 0; padding: 0 !important; }
html body#martha-app.martha-design-system #view-martha .martha-chat-view { height: 100%; min-height: 0; padding: 0; }
html body#martha-app.martha-design-system #view-martha .martha-chat-shell { display: grid !important; grid-template-columns: 280px minmax(0, 1fr) !important; width: 100%; height: 100dvh !important; min-height: 0; margin: 0 !important; padding: 0; border: 0 !important; border-radius: 0 !important; overflow: hidden; background: var(--martha-ref-background); }
html body#martha-app.martha-design-system #view-martha .martha-chat-shell.martha-context-open { grid-template-columns: 280px minmax(0, 1fr) 320px !important; }
html body#martha-app.martha-design-system #view-martha .martha-chat-main { display: flex; flex-direction: column; gap: 0; min-width: 0; height: 100dvh; min-height: 0; padding: 0; overflow: hidden; background: var(--martha-ref-background); }

/* Shared navigation: actual destinations, grouped, no mock business content. */
html body#martha-app.martha-design-system .app-shell > .sidebar,
html body#martha-app.martha-design-system #view-martha .martha-chat-sidebar { display: flex; flex-direction: column; gap: 0; width: 280px !important; height: 100dvh; min-height: 0; padding: 16px 12px 0 !important; overflow: hidden; border: 0; border-right: 1px solid var(--martha-ref-border); background: var(--martha-ref-sidebar) !important; }
html body#martha-app.martha-client-chat .app-shell > .sidebar { display: none !important; }
html body#martha-app.martha-design-system :is(.martha-cockpit-brand,.martha-secondary-brand) { flex: 0 0 auto; margin: 0 0 12px; padding: 0; border: 0; }
html body#martha-app.martha-design-system :is(.martha-client-brand-button,.martha-secondary-brand button) { display: flex; align-items: center; gap: 10px; height: 34px; min-height: 0; padding: 0 4px; border: 0; background: transparent; text-align: left; }
html body#martha-app.martha-design-system :is(.martha-client-brand-logo,.martha-secondary-brand-logo) { display: block; flex: 0 0 32px; width: 32px; height: 34px; padding: 0; border: 0; border-radius: 0; background: url('/assets/martha-logo-transparent.png') center / contain no-repeat !important; box-shadow: none; }
html body#martha-app.martha-design-system :is(.martha-client-brand-name,.martha-secondary-brand button > span:last-child,.martha-auth-card-brand strong) { font-family: var(--martha-ref-serif) !important; font-size: 25px; font-weight: 400; letter-spacing: -.01em; color: var(--martha-ds-gold); }
html body#martha-app.martha-design-system :is(.martha-client-new-discussion,.martha-secondary-new) { display: flex; align-items: center; justify-content: flex-start; gap: 8px; flex: 0 0 auto; width: 100%; min-height: 36px; margin: 0; padding: 7px 10px; border: 0; border-radius: 8px; background: var(--martha-ref-foreground) !important; color: var(--martha-ref-background) !important; box-shadow: none; font-size: 14px; font-weight: 500; }
html body#martha-app.martha-design-system :is(.martha-client-new-discussion,.martha-secondary-new) svg { width: 16px; height: 16px; color: currentColor; }
html body#martha-app.martha-design-system :is(.martha-client-new-discussion,.martha-secondary-new) span { color: inherit !important; }
html body#martha-app.martha-design-system :is(.martha-client-new-discussion,.martha-secondary-new):hover { opacity: .9; transform: none; }
html body#martha-app.martha-design-system :is(.martha-client-sidebar-actions,.martha-secondary-actions) { display: flex; align-items: center; flex: 0 0 auto; gap: 6px; min-width: 0; margin: 0; }
html body#martha-app.martha-design-system .martha-client-sidebar-actions .martha-client-new-discussion,
html body#martha-app.martha-design-system .martha-secondary-actions .martha-secondary-new { flex: 1 1 auto; width: auto; min-width: 0; }
html body#martha-app.martha-design-system :is(.martha-sidebar-browser,.martha-secondary-browser) { display: grid; place-items: center; flex: 0 0 32px; width: 32px; height: 32px; min-width: 32px; min-height: 32px; padding: 7px; border: 0; border-radius: 8px; color: var(--martha-ref-muted-foreground); background: transparent !important; box-shadow: none !important; }
html body#martha-app.martha-design-system :is(.martha-sidebar-browser,.martha-secondary-browser):hover,
html body#martha-app.martha-design-system :is(.martha-sidebar-browser,.martha-secondary-browser):focus-visible { color: var(--martha-ref-foreground); background: var(--martha-ref-accent) !important; outline: none; }
html body#martha-app.martha-design-system :is(.martha-sidebar-browser,.martha-secondary-browser) svg { width: 18px; height: 18px; }
html body#martha-app.martha-design-system :is(.martha-client-sidebar-search,.martha-secondary-command-search) { flex: 0 0 auto; width: 100%; max-width: none; margin: 8px 0 10px; }
html body#martha-app.martha-design-system :is(.martha-chat-command-search,.martha-secondary-command-search,.martha-client-sidebar-search) { display: flex; align-items: center; gap: 8px; height: 36px; min-height: 36px; padding: 6px 10px; border: 0; border-radius: 8px; color: var(--martha-ref-muted-foreground); background: transparent !important; box-shadow: none; }
html body#martha-app.martha-design-system :is(.martha-chat-command-search,.martha-secondary-command-search,.martha-client-sidebar-search):focus-within { background: var(--martha-ref-accent) !important; }
html body#martha-app.martha-design-system :is(.martha-chat-command-search,.martha-secondary-command-search,.martha-client-sidebar-search) input { min-width: 0; width: 100%; height: 26px; min-height: 0; padding: 0; border: 0; background: transparent !important; font-size: 14px; box-shadow: none; }
html body#martha-app.martha-design-system :is(.martha-chat-command-search,.martha-secondary-command-search,.martha-client-sidebar-search) kbd { display: none; }
html body#martha-app.martha-design-system .martha-sidebar-scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden; scrollbar-width: thin; }
html body#martha-app.martha-design-system :is(.martha-cockpit-nav-list,.martha-secondary-nav) { display: block !important; height: auto; max-height: none; margin: 0; padding: 0; overflow: visible; }
html body#martha-app.martha-design-system .martha-nav-group { margin: 0 0 12px; padding: 0; border: 0; }
html body#martha-app.martha-design-system .martha-nav-group :is(h2,summary) { margin: 0; padding: 8px 10px 6px; color: var(--martha-ref-muted-foreground); font-size: 11px; font-weight: 500; letter-spacing: .045em; text-transform: uppercase; cursor: pointer; }
html body#martha-app.martha-design-system .martha-nav-group summary { border-radius: 8px; }
html body#martha-app.martha-design-system .martha-nav-group summary:hover { color: var(--martha-ref-foreground); background: var(--martha-ref-accent); }
html body#martha-app.martha-design-system :is(.martha-secondary-nav .nav-item,.martha-cockpit-nav-list .martha-cockpit-nav) { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 36px; height: auto; margin: 2px 0 0; padding: 8px 10px; border: 0 !important; border-radius: 8px; color: var(--martha-ref-muted-foreground); background: transparent !important; box-shadow: none !important; font-size: 14px; font-weight: 400; line-height: 20px; text-align: left; }
html body#martha-app.martha-design-system :is(.martha-secondary-nav .nav-item,.martha-cockpit-nav-list .martha-cockpit-nav):hover { color: var(--martha-ref-foreground); background: var(--martha-ref-accent) !important; transform: none; }
html body#martha-app.martha-design-system :is(.martha-secondary-nav .nav-item.active,.martha-cockpit-nav-list .martha-cockpit-nav.active) { color: var(--martha-ref-background) !important; background: var(--martha-ref-foreground) !important; font-weight: 500; }
html body#martha-app.martha-design-system :is(.martha-secondary-nav .nav-item,.martha-cockpit-nav-list .martha-cockpit-nav)::before { display: none; }
html body#martha-app.martha-design-system :is(.static-nav-icon,.martha-chat-nav-icon) { display: flex; flex: 0 0 18px; width: 18px; height: 18px; padding: 0; border: 0; color: inherit !important; background: transparent !important; }
html body#martha-app.martha-design-system :is(.static-nav-svg,.martha-chat-nav-icon svg) { width: 18px; height: 18px; }
html body#martha-app.martha-design-system :is(.martha-secondary-recent,.martha-client-recent) { display: block; position: relative; margin: 16px 0; padding: 14px 0 0; border-top: 1px solid var(--martha-ref-border); }
html body#martha-app.martha-design-system :is(.martha-secondary-heading,.martha-client-sidebar-heading h2) { margin: 0; padding: 0 90px 8px 10px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--martha-ref-muted-foreground); }
html body#martha-app.martha-design-system .martha-client-conversation-list { max-height: none; overflow: visible; }
html body#martha-app.martha-design-system :is(.martha-chat-conversation,.martha-chat-conversation-item) { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; border-radius: 12px; background: transparent; padding: 8px 10px; text-align: left; }
html body#martha-app.martha-design-system :is(.martha-chat-conversation,.martha-chat-conversation-item):hover { background: var(--martha-ref-accent); }
html body#martha-app.martha-design-system .martha-chat-conversation-dot { display: grid; place-items: center; flex: 0 0 30px; width: 30px; height: 30px; border-radius: 999px; background: rgba(244, 218, 158, .32); }
html body#martha-app.martha-design-system .martha-chat-conversation-title { display: block; font-size: 14px; font-weight: 500; color: var(--martha-ref-foreground); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html body#martha-app.martha-design-system .martha-chat-conversation-meta { display: block; font-size: 12px; color: var(--martha-ref-muted-foreground); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html body#martha-app.martha-design-system :is(.martha-client-see-all,.martha-secondary-see-all) { position: absolute; top: 14px; right: 0; padding: 0 10px 8px 0; border: 0; background: transparent; color: var(--martha-ref-gold); font-size: 12px; font-weight: 500; }
html body#martha-app.martha-design-system :is(.martha-client-profile,.martha-secondary-profile) { display: flex; align-items: center; flex: 0 0 auto; gap: 10px; width: calc(100% + 24px); min-height: 68px; margin: auto -12px 0; padding: 12px 20px; border: 0; border-top: 1px solid var(--martha-ref-border); border-radius: 0; color: var(--martha-ref-foreground); background: var(--martha-ref-sidebar); text-align: left; }
html body#martha-app.martha-design-system :is(.martha-client-profile-avatar,.martha-secondary-profile-avatar) { display: grid; place-items: center; width: 32px; height: 32px; flex: 0 0 32px; border: 1px solid var(--martha-ref-border); border-radius: 50%; color: var(--martha-ref-foreground); background: var(--martha-ref-accent); font-size: 11px; }
html body#martha-app.martha-design-system :is(.martha-client-profile,.martha-secondary-profile) strong { font-size: 13px; font-weight: 500; }
html body#martha-app.martha-design-system :is(.martha-client-profile,.martha-secondary-profile) small { display: block; color: var(--martha-ref-muted-foreground); font-size: 11px; }
html body#martha-app.martha-design-system :is(.martha-client-profile-more,.martha-secondary-profile-more) { margin-left: auto; }

/* Guided demo and plain-language readiness directory. */
html body#martha-app.martha-design-system .martha-demo-banner-actions { display: flex; align-items: center; flex: 0 0 auto; gap: 12px; }
html body#martha-app.martha-design-system .martha-demo-banner .martha-demo-tour-link { display: inline-flex; align-items: center; min-height: 32px; padding: 4px 10px; border: 1px solid #dfc78f; border-radius: 8px; color: #684711; background: rgba(255,255,255,.5); font-weight: 600; text-decoration: none; }
html body#martha-app.martha-design-system .martha-demo-banner .martha-demo-tour-link:hover,
html body#martha-app.martha-design-system .martha-demo-banner .martha-demo-tour-link:focus-visible { background: #fff7e8; outline: 2px solid var(--martha-ref-ring); outline-offset: 2px; }
html body#martha-app.martha-design-system .martha-demo-tour { margin: 18px 0; padding: 20px; border: 1px solid var(--martha-ref-border); border-radius: 18px; background: linear-gradient(135deg, var(--martha-ref-card), #F5EEE0); }
html body#martha-app.martha-design-system .martha-demo-tour-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
html body#martha-app.martha-design-system .martha-demo-tour-heading h3,
html body#martha-app.martha-design-system .martha-readiness-navigation > div h3 { margin: 0 0 5px; color: var(--martha-ref-foreground); font-size: 20px; font-weight: 550; }
html body#martha-app.martha-design-system .martha-demo-tour-heading p:not(.martha-guide-kicker),
html body#martha-app.martha-design-system .martha-readiness-navigation > div p:not(.martha-guide-kicker) { margin: 0; color: var(--martha-ref-muted-foreground); }
html body#martha-app.martha-design-system .martha-demo-tour-readonly { flex: 0 0 auto; padding: 5px 9px; border: 1px solid var(--martha-ref-border); border-radius: 999px; color: #684711; background: #FFF9EB; font-size: 12px; }
html body#martha-app.martha-design-system .martha-demo-tour-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
html body#martha-app.martha-design-system .martha-demo-tour-step { min-width: 0; padding: 14px; border: 1px solid var(--martha-ref-border); border-radius: 12px; background: var(--martha-ref-card); }
html body#martha-app.martha-design-system .martha-demo-tour-number { color: var(--martha-ref-gold); font-size: 11px; font-weight: 700; letter-spacing: .08em; }
html body#martha-app.martha-design-system .martha-demo-tour-step h4 { margin: 4px 0; color: var(--martha-ref-foreground); font-size: 15px; font-weight: 600; }
html body#martha-app.martha-design-system .martha-demo-tour-step p { margin: 0 0 8px; color: var(--martha-ref-muted-foreground); font-size: 13px; }
html body#martha-app.martha-design-system .martha-demo-tour-links { display: flex; flex-wrap: wrap; gap: 6px 12px; }
html body#martha-app.martha-design-system .martha-demo-tour-links a,
html body#martha-app.martha-design-system .martha-readiness-item > a,
html body#martha-app.martha-design-system .martha-readiness-navigation-groups a { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; color: var(--martha-ref-gold); font-size: 13px; font-weight: 600; text-decoration: none; }
html body#martha-app.martha-design-system .martha-demo-tour-links a:hover,
html body#martha-app.martha-design-system .martha-readiness-item > a:hover,
html body#martha-app.martha-design-system .martha-readiness-navigation-groups a:hover { text-decoration: underline; }
html body#martha-app.martha-design-system .martha-availability-view > .section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
html body#martha-app.martha-design-system .martha-readiness-explainer { margin: 12px 0 18px; padding: 12px 14px; border-left: 3px solid var(--martha-ref-ring); border-radius: 0 10px 10px 0; color: var(--martha-ref-foreground); background: #F8F0E2; }
html body#martha-app.martha-design-system .martha-readiness-groups { display: grid; gap: 16px; }
html body#martha-app.martha-design-system .martha-readiness-group,
html body#martha-app.martha-design-system .martha-readiness-navigation { min-width: 0; padding: 18px; border: 1px solid var(--martha-ref-border); border-radius: 16px; background: var(--martha-ref-card); }
html body#martha-app.martha-design-system .martha-readiness-group > header { margin-bottom: 12px; }
html body#martha-app.martha-design-system .martha-readiness-group > header h3 { margin: 0 0 4px; color: var(--martha-ref-foreground); font-size: 19px; font-weight: 550; }
html body#martha-app.martha-design-system .martha-readiness-group > header p:not(.martha-guide-kicker) { margin: 0; color: var(--martha-ref-muted-foreground); }
html body#martha-app.martha-design-system .martha-readiness-items { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
html body#martha-app.martha-design-system .martha-readiness-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-width: 0; padding: 11px 12px; border: 1px solid var(--martha-ref-border); border-radius: 10px; background: #FFFEFC; }
html body#martha-app.martha-design-system .martha-readiness-item h4 { margin: 0 0 2px; color: var(--martha-ref-foreground); font-size: 14px; font-weight: 600; }
html body#martha-app.martha-design-system .martha-readiness-item p { margin: 0; color: var(--martha-ref-muted-foreground); font-size: 12px; line-height: 1.45; }
html body#martha-app.martha-design-system .martha-readiness-item > a { flex: 0 0 auto; }
html body#martha-app.martha-design-system .martha-readiness-navigation { margin-top: 16px; background: linear-gradient(135deg, var(--martha-ref-card), #F5EEE0); }
html body#martha-app.martha-design-system .martha-readiness-navigation-groups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 14px; }
html body#martha-app.martha-design-system .martha-readiness-nav-group { min-width: 0; }
html body#martha-app.martha-design-system .martha-readiness-nav-group h3 { margin: 0 0 6px; color: var(--martha-ref-muted-foreground); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; }
html body#martha-app.martha-design-system .martha-readiness-nav-group > div { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px 12px; }
html body#martha-app.martha-design-system .martha-readiness-navigation-groups a { justify-content: space-between; min-width: 0; padding: 3px 0; }
html body#martha-app.martha-design-system .martha-readiness-navigation-groups a span { flex: 0 0 auto; }
@media (max-width: 760px) {
  html body#martha-app.martha-design-system .martha-demo-tour { padding: 15px; }
  html body#martha-app.martha-design-system .martha-demo-tour-heading { display: grid; }
  html body#martha-app.martha-design-system .martha-demo-tour-grid,
  html body#martha-app.martha-design-system .martha-readiness-items,
  html body#martha-app.martha-design-system .martha-readiness-navigation-groups { grid-template-columns: minmax(0, 1fr); }
  html body#martha-app.martha-design-system .martha-readiness-item { align-items: flex-start; }
  html body#martha-app.martha-design-system .martha-readiness-navigation-groups a { min-height: 34px; }
  html body#martha-app.martha-design-system .martha-demo-banner { min-height: 0; align-items: center; gap: 6px; padding: 4px 8px; font-size: 10px; line-height: 1.15; }
  html body#martha-app.martha-design-system .martha-demo-banner > span { display: block; flex: 1 1 auto; min-width: 0; white-space: nowrap; }
  html body#martha-app.martha-design-system .martha-demo-banner > span > span { display: none; }
  html body#martha-app.martha-design-system .martha-demo-banner-actions { flex-wrap: nowrap; justify-content: flex-end; gap: 6px; }
  html body#martha-app.martha-design-system .martha-demo-banner .martha-demo-tour-link { min-height: 30px; padding: 3px 7px; }
  html body#martha-app.martha-design-system .martha-demo-banner .martha-demo-exit { font-size: 10px; }
  html body#martha-app.martha-design-system .martha-availability-view > .section-heading { display: grid; }
}

/* Header / home / conversation. */
html body#martha-app.martha-design-system :is(.martha-client-mobile-header,.topbar) { display: flex; align-items: center; flex: 0 0 56px; gap: 8px; width: 100%; height: 56px; min-height: 56px; margin: 0; padding: 0 20px; border: 0; border-bottom: 1px solid var(--martha-ref-border); border-radius: 0; background: var(--martha-ref-background); }
html body#martha-app.martha-design-system .topbar { position: sticky; top: 0; z-index: 5; }
html body#martha-app.martha-design-system :is(.topbar h1,#martha-chat-header-title) { flex: 1; min-width: 0; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; font-weight: 500; color: var(--martha-ref-foreground); }
html body#martha-app.martha-design-system .topbar :is(.eyebrow,.global-system-status) { display: none; }
html body#martha-app.martha-design-system .topbar > div:first-of-type { flex: 1; }
html body#martha-app.martha-design-system .top-actions { margin-left: auto; gap: 10px; }
html body#martha-app.martha-design-system :is(.martha-client-mobile-new,.martha-context-toggle,.martha-client-mobile-menu,.martha-secondary-mobile-menu) { display: grid; place-items: center; width: 36px; height: 36px; flex: 0 0 36px; padding: 8px; border: 0; border-radius: 8px; color: var(--martha-ref-muted-foreground); background: transparent; }
html body#martha-app.martha-design-system :is(.martha-client-mobile-new,.martha-context-toggle,.martha-client-mobile-menu,.martha-secondary-mobile-menu) svg { width: 20px; height: 20px; }
html body#martha-app.martha-design-system :is(.martha-client-mobile-menu,.martha-secondary-mobile-menu) { display: none; }
html body#martha-app.martha-design-system #view-martha .martha-cockpit-welcome { display: flex; flex: 0 0 auto; flex-direction: column-reverse; align-items: center; justify-content: center; gap: 22px; width: 100%; max-width: 720px; min-height: 0; margin: auto auto 32px; padding: 32px 24px 0; text-align: center; }
html body#martha-app.martha-design-system #view-martha .martha-cockpit-welcome h1,
html body#martha-app.martha-design-system #view-martha .martha-cockpit-welcome h1 span { margin: 0; color: var(--martha-ref-foreground); font-family: var(--martha-ref-sans) !important; font-size: clamp(30px,3vw,40px); font-weight: 400; line-height: 1.15; letter-spacing: -.025em; }
html body#martha-app.martha-design-system #view-martha .martha-cockpit-welcome > :is(.martha-chat-brand-mark,.martha-cockpit-hero-logo) { position: static; flex: 0 0 64px; width: 64px; height: 64px; margin: 0; border: 0; border-radius: 0; background: url('/assets/martha-logo-transparent.png') center / contain no-repeat; box-shadow: none; }
html body#martha-app.martha-design-system #view-martha .martha-chat-main:has(.martha-chat-message) .martha-cockpit-welcome { display: none; }

/* Accueil Martha — une composition calme, lisible et complete. Les raccourcis
   restent des boutons fonctionnels, mais ne retombent jamais sur le style
   navigateur par defaut. L'or signale le point d'entree, pas chaque surface. */
html body#martha-app.martha-design-system #view-martha .martha-client-home-hero-copy {
  display: flex; flex-direction: column; align-items: center; width: min(100%, 620px);
}
html body#martha-app.martha-design-system #view-martha .martha-client-home-kicker {
  margin: 0 0 12px; color: var(--martha-ref-muted-foreground); font-size: 10px;
  font-weight: 600; letter-spacing: .14em; line-height: 1.4; text-transform: uppercase;
}
html body#martha-app.martha-design-system #view-martha .martha-client-home-lead {
  max-width: 520px; margin: 10px 0 0; color: var(--martha-ref-muted-foreground);
  font-family: var(--martha-ref-sans) !important; font-size: 15px; line-height: 1.55;
}
html body#martha-app.martha-design-system #view-martha .martha-client-home-meta {
  display: inline-flex; align-items: center; gap: 7px; margin-top: 16px; color: var(--martha-ref-muted-foreground);
  font-size: 11px; line-height: 1.4;
}
html body#martha-app.martha-design-system #view-martha .martha-client-home-meta-dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--martha-ref-muted-foreground);
}
html body#martha-app.martha-design-system #view-martha .martha-client-home-meta-separator { opacity: .45; }
html body#martha-app.martha-design-system #view-martha .martha-client-home-hero-art {
  display: grid; position: relative; width: 52px; height: 52px; place-items: center; flex: 0 0 52px;
  border: 1px solid color-mix(in srgb, var(--martha-ref-gold) 48%, transparent);
  border-radius: 16px; background: var(--martha-ref-card); box-shadow: none;
}
html body#martha-app.martha-design-system #view-martha .martha-client-home-hero-art :is(.martha-client-home-orbit) { display: none; }
html body#martha-app.martha-design-system #view-martha .martha-client-home-hero-mark {
  display: block; width: 34px; height: 34px; overflow: hidden; color: transparent; font-size: 0;
  background: url('/assets/martha-logo-transparent.png') center / auto 190% no-repeat;
}
html body#martha-app.martha-design-system #view-martha .martha-client-home-deck {
  width: min(calc(100% - 48px), 672px); margin: 0 auto 18px;
}
html body#martha-app.martha-design-system #view-martha .martha-client-home-section-heading {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 12px;
}
html body#martha-app.martha-design-system #view-martha .martha-client-home-section-heading .martha-client-home-kicker { margin-bottom: 6px; }
html body#martha-app.martha-design-system #view-martha .martha-client-home-section-heading h2 {
  margin: 0; color: var(--martha-ref-foreground); font-size: 17px; font-weight: 500; letter-spacing: -.015em;
}
html body#martha-app.martha-design-system #view-martha .martha-client-home-section-note {
  color: var(--martha-ref-muted-foreground); font-size: 11px; white-space: nowrap;
}
html body#martha-app.martha-design-system #view-martha .martha-client-home-actions {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px;
}
html body#martha-app.martha-design-system #view-martha .martha-client-home-action {
  display: grid; grid-template-columns: minmax(0, 1fr) 16px; align-items: center; gap: 12px;
  min-width: 0; min-height: 64px; padding: 12px 14px; border: 1px solid var(--martha-ref-border);
  border-radius: 15px; color: var(--martha-ref-foreground); background: transparent;
  cursor: pointer; font: inherit; text-align: left; transition: border-color .16s ease, background .16s ease;
}
html body#martha-app.martha-design-system #view-martha .martha-client-home-action:hover,
html body#martha-app.martha-design-system #view-martha .martha-client-home-action:focus-visible {
  border-color: color-mix(in srgb, var(--martha-ref-foreground) 32%, transparent);
  background: var(--martha-ref-accent); outline: none;
}
html body#martha-app.martha-design-system #view-martha .martha-client-home-action.is-featured {
  border-color: color-mix(in srgb, var(--martha-ref-gold) 62%, transparent);
}
html body#martha-app.martha-design-system #view-martha .martha-client-home-action-icon {
  display: none;
}
html body#martha-app.martha-design-system #view-martha .martha-client-home-action.is-featured .martha-client-home-action-icon {
  border-color: color-mix(in srgb, var(--martha-ref-gold) 50%, transparent); color: var(--martha-ref-gold-bright);
}
html body#martha-app.martha-design-system #view-martha .martha-client-home-action b,
html body#martha-app.martha-design-system #view-martha .martha-client-home-action small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
html body#martha-app.martha-design-system #view-martha .martha-client-home-action b { font-size: 13px; font-weight: 500; }
html body#martha-app.martha-design-system #view-martha .martha-client-home-action small { margin-top: 4px; color: var(--martha-ref-muted-foreground); font-size: 11px; line-height: 1.35; }
html body#martha-app.martha-design-system #view-martha .martha-client-home-action-arrow {
  color: var(--martha-ref-muted-foreground); font-size: 16px; text-align: right;
}
html body#martha-app.martha-design-system #view-martha .martha-client-home-lower { display: none; }

/* The shell stays chat-first: the menu owns destinations, while the empty
   state shows only the two most useful entry points before the composer. */
html body#martha-app.martha-design-system #view-martha .martha-client-home-action:nth-child(n + 3) { display: none; }
html body#martha-app.martha-design-system #view-martha .martha-client-home-section-heading {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
html body#martha-app.martha-design-system #view-martha:has(.martha-client-home-deck) .martha-chat-provider-notice { display: none; }
html body#martha-app.martha-design-system #view-martha:not(:has(.martha-chat-message)) #martha-chat-state { display: none; }

html body#martha-app.martha-design-system #view-martha .martha-chat-feed { flex: 1 1 0; min-height: 0; width: 100%; max-width: 768px; margin: 0 auto; padding: 32px 24px; overflow-y: auto; scrollbar-width: thin; }
html body#martha-app.martha-design-system #view-martha .martha-chat-feed:empty { display: none; }
html body#martha-app.martha-design-system #view-martha .martha-chat-message { display: block; width: 100%; max-width: none; margin: 0 0 24px; padding: 0; border: 0; background: transparent; }
html body#martha-app.martha-design-system #view-martha .martha-chat-message-avatar { display: none; }
html body#martha-app.martha-design-system #view-martha .martha-chat-message.user { display: flex; justify-content: flex-end; }
html body#martha-app.martha-design-system #view-martha .martha-chat-message.user .martha-chat-message-body { width: fit-content; max-width: 85%; }
html body#martha-app.martha-design-system #view-martha .martha-chat-message-bubble { width: 100%; max-width: none; padding: 10px 16px; border: 0; border-radius: 16px 16px 4px 16px; color: var(--martha-ref-foreground); background: var(--martha-ref-elevated); font-size: 15px; line-height: 1.7; }
html body#martha-app.martha-design-system #view-martha .martha-chat-message.assistant:not([class*="-chat-card"]) .martha-chat-message-bubble { background: transparent; border: 0; border-radius: 0; padding: 0; }
html body#martha-app.martha-design-system #view-martha .martha-chat-message-bubble p { font-size: inherit; line-height: inherit; }
html body#martha-app.martha-design-system #view-martha .martha-chat-message-meta { margin-top: 6px; color: var(--martha-ref-muted-foreground); font-size: 11px; }
html body#martha-app.martha-design-system #view-martha :is(.martha-chat-message-action,.martha-chat-message-actions button) { padding: 4px 8px; border: 0; border-radius: 6px; color: var(--martha-ref-muted-foreground); background: transparent; font-size: 12px; }
html body#martha-app.martha-design-system #view-martha .martha-chat-message-actions button:hover { color: var(--martha-ref-foreground); background: var(--martha-ref-accent); }
html body#martha-app.martha-design-system #view-martha [class*="-chat-card"] .martha-chat-message-bubble { max-width: none; padding: 16px; border: 1px solid var(--martha-ref-border); border-radius: 16px; background: var(--martha-ref-card); }
html body#martha-app.martha-client-chat .martha-client-welcome-actions { display: none !important; }
html body#martha-app.martha-client-chat #view-martha .martha-starter-prompts { display: none !important; }

/* Composer: one surface, 720px measure, native controls with full labels. */
html body#martha-app.martha-design-system #view-martha .martha-chat-composer-wrap { flex: 0 0 auto; width: calc(100% - 48px); max-width: 720px; margin: 0 auto 24px; padding: 0; background: transparent; }
html body#martha-app.martha-design-system #view-martha .martha-chat-main:not(:has(.martha-chat-message)) .martha-chat-composer-wrap { margin-bottom: auto; }
html body#martha-app.martha-design-system #view-martha .martha-chat-composer { width: 100%; min-height: 0; max-width: none; margin: 0; padding: 8px; border: 1px solid var(--martha-ref-border); border-radius: 22px; background: var(--martha-ref-card) !important; box-shadow: none; transform: none; }
html body#martha-app.martha-design-system #view-martha .martha-chat-composer:focus-within { border-color: var(--martha-ref-ring); box-shadow: 0 0 0 2px oklch(1 0 0 / 5%); }
html body#martha-app.martha-design-system #view-martha .martha-chat-composer textarea { display: block; width: 100%; min-height: 40px; max-height: 200px; margin: 0; padding: 10px 12px 6px; border: 0; border-radius: 0; color: var(--martha-ref-foreground); background: transparent !important; box-shadow: none !important; resize: none; font-size: 15px; line-height: 1.6; }
html body#martha-app.martha-design-system #view-martha .martha-chat-composer textarea:focus-visible { outline: none; }
html body#martha-app.martha-design-system #view-martha :is(.martha-chat-composer-tools,.martha-chat-composer-left,.martha-client-composer-primary,.martha-client-composer-secondary,.martha-chat-composer-right) { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; min-width: 0; margin: 0; padding: 0; }
html body#martha-app.martha-design-system #view-martha .martha-chat-composer-tools { gap: 8px 6px; padding-top: 4px; }
html body#martha-app.martha-design-system #view-martha .martha-chat-composer-left { flex: 1 1 auto; }
html body#martha-app.martha-design-system #view-martha .martha-chat-composer-right { flex: 0 0 auto; margin-left: auto; }
html body#martha-app.martha-design-system #view-martha :is(.martha-client-composer-plus,.martha-chat-tool,.martha-client-tool-toggle,.martha-client-select select) { display: inline-flex; align-items: center; justify-content: center; gap: 6px; width: auto; height: 30px; min-height: 30px; margin: 0; padding: 5px 10px; border: 1px solid var(--martha-ref-border); border-radius: 999px; color: var(--martha-ref-muted-foreground); background: var(--martha-ref-card); box-shadow: none; font-size: 12px; line-height: 18px; }
html body#martha-app.martha-design-system #view-martha .martha-client-select select { max-width: none; width: auto; min-width: max-content; white-space: nowrap; text-overflow: clip; }
html body#martha-app.martha-design-system #view-martha .martha-client-select { min-width: 0; max-width: 100%; padding: 0; border: 0; background: transparent; }
html body#martha-app.martha-design-system #view-martha :is(.martha-client-composer-plus,.martha-chat-tool) { width: 32px; height: 32px; padding: 7px; }
html body#martha-app.martha-design-system #view-martha .martha-client-tool-toggle svg { width: 14px; height: 14px; }
html body#martha-app.martha-design-system #view-martha :is(.martha-chat-send,.martha-chat-stop) { display: grid; place-items: center; width: 36px; height: 36px; min-height: 36px; padding: 9px; border: 0; border-radius: 50%; color: var(--martha-ref-background); background: var(--martha-ref-foreground) !important; box-shadow: none; }
html body#martha-app.martha-design-system #view-martha :is(.martha-chat-send,.martha-chat-stop) svg { width: 18px; height: 18px; }
html body#martha-app.martha-design-system #view-martha .martha-chat-send:disabled { background: var(--martha-ref-elevated) !important; color: var(--martha-ref-muted-foreground); opacity: .6; }
html body#martha-app.martha-design-system #view-martha .martha-chat-disclaimer { margin: 8px 0 0; padding: 0; color: var(--martha-ref-muted-foreground); font-size: 11px; line-height: 1.5; text-align: center; }
html body#martha-app.martha-design-system #martha-chat-state[data-state="ready"] { display: none; }
html body#martha-app.martha-design-system #view-martha .martha-chat-provider-notice { flex: 0 0 auto; align-self: center; width: calc(100% - 48px); max-width: 720px; margin: 0 auto 12px; padding: 8px 12px; border: 1px solid var(--martha-ref-border); border-radius: 8px; color: var(--martha-ref-muted-foreground); background: var(--martha-ref-card); font-size: 12px; }
html body#martha-app.martha-design-system #view-martha .martha-chat-rail { display: none; min-width: 0; height: 100dvh; padding: 20px; border-left: 1px solid var(--martha-ref-border); overflow-y: auto; background: var(--martha-ref-sidebar); }
html body#martha-app.martha-design-system #view-martha .martha-context-open .martha-chat-rail { display: block; }

/* Business forms, cards, tables: no grid or data substitution. */
html body#martha-app.martha-design-system.martha-client-secondary .martha-surface.active-view { width: 100%; max-width: 1200px; margin: 0 auto; padding: 32px 32px 56px; }
html body#martha-app.martha-design-system :is(.section-heading,.hero) { gap: 20px; margin-bottom: 24px; padding: 0; border: 0; background: transparent; }
html body#martha-app.martha-design-system :is(.section-heading h2,.hero h2) { margin: 0 0 6px; font-size: 24px; line-height: 1.25; }
html body#martha-app.martha-design-system :is(.section-heading p,.hero p) { max-width: 760px; font-size: 14px; line-height: 1.6; }
html body#martha-app.martha-design-system .eyebrow { font-size: 10px; letter-spacing: .08em; color: var(--martha-ref-muted-foreground); }
html body#martha-app.martha-design-system :is(.panel,.metric,.agent-card,.health-card,.martha-cockpit-card,.martha-guide-card) { border: 1px solid var(--martha-ref-border); border-radius: 12px; background: var(--martha-ref-card); box-shadow: none; }
html body#martha-app.martha-design-system .panel { padding: 20px; }
html body#martha-app.martha-design-system .panel-heading { margin-bottom: 18px; }
html body#martha-app.martha-design-system :is(.panel h3,.panel-heading h3) { margin: 0; font-size: 15px; font-weight: 500; }
html body#martha-app.martha-design-system :is(.panel-heading p,.muted,.event-meta,.field-hint) { color: var(--martha-ref-muted-foreground); font-size: 12px; line-height: 1.6; }
html body#martha-app.martha-design-system :is(.primary,.martha-dialog-primary) { min-height: 36px; padding: 8px 14px; border: 1px solid transparent; border-radius: 8px; color: var(--martha-ref-background) !important; background: var(--martha-ref-foreground) !important; box-shadow: none; font-size: 14px; font-weight: 500; }
html body#martha-app.martha-design-system :is(.primary,.martha-dialog-primary):hover { opacity: .9; transform: none; }
html body#martha-app.martha-design-system :is(.ghost,.text-button,.martha-dialog-secondary) { min-height: 32px; padding: 6px 10px; border: 1px solid var(--martha-ref-border); border-radius: 8px; color: var(--martha-ref-foreground); background: transparent; box-shadow: none; font-size: 12px; }
html body#martha-app.martha-design-system :is(.ghost,.text-button,.martha-dialog-secondary):hover { background: var(--martha-ref-accent); }
html body#martha-app.martha-design-system :is(.pill,.badge,.status,.count,.event-status) { border: 1px solid var(--martha-ref-border); border-radius: 999px; padding: 4px 10px; color: var(--martha-ref-muted-foreground); background: var(--martha-ref-card); font-size: 11px; font-weight: 500; letter-spacing: 0; }
html body#martha-app.martha-design-system :is(.pill.success,.badge.success) { border-color: oklch(1 0 0 / 25%); color: var(--martha-ref-foreground); background: oklch(1 0 0 / 6%); }
html body#martha-app.martha-design-system :is(.pill.danger,.pill.error,.pill.critical,.status.overdue,.error) { color: var(--martha-ref-destructive); }
html body#martha-app.martha-design-system :is(input,select,textarea) { max-width: 100%; min-height: 36px; border: 1px solid var(--martha-ref-input); border-radius: 8px; padding: 8px 10px; color: var(--martha-ref-foreground); background: var(--martha-ref-popover); box-shadow: none; }
html body#martha-app.martha-design-system :is(input[type="checkbox"],input[type="radio"]) { min-height: 0; accent-color: var(--martha-ref-foreground); }
html body#martha-app.martha-design-system :is(input,textarea)::placeholder { color: var(--martha-ref-muted-foreground); opacity: .75; }
html body#martha-app.martha-design-system .form { gap: 16px; }
html body#martha-app.martha-design-system .form label { gap: 6px; font-size: 12px; color: var(--martha-ref-muted-foreground); }
html body#martha-app.martha-design-system :is(.event,.client-record-card,.client-order-card) { border: 1px solid var(--martha-ref-border); border-radius: 10px; background: transparent; box-shadow: none; }
html body#martha-app.martha-design-system .event { padding: 14px; }
html body#martha-app.martha-design-system .metric strong { font-size: 24px; font-weight: 600; letter-spacing: -.025em; }
html body#martha-app.martha-design-system :is(.martha-client-subnavigation,.martha-module-tabs) { gap: 4px; padding: 4px; border: 1px solid var(--martha-ref-border); border-radius: 10px; background: var(--martha-ref-card); }
html body#martha-app.martha-design-system .martha-client-subnavigation button { padding: 8px 12px; border: 0; border-radius: 7px; background: transparent; color: var(--martha-ref-muted-foreground); }
html body#martha-app.martha-design-system .martha-client-subnavigation button.active { color: var(--martha-ref-foreground); background: var(--martha-ref-accent); }
html body#martha-app.martha-design-system table { border-collapse: collapse; width: 100%; font-size: 14px; }
html body#martha-app.martha-design-system th { padding: 10px 16px; border-bottom: 1px solid var(--martha-ref-border); color: var(--martha-ref-muted-foreground); background: var(--martha-ref-card); font-size: 12px; font-weight: 500; text-align: left; }
html body#martha-app.martha-design-system td { padding: 12px 16px; border-bottom: 1px solid var(--martha-ref-border); }
html body#martha-app.martha-design-system tr:hover td { background: var(--martha-ref-accent); }
html body#martha-app.martha-client-secondary #view-commercial .client-record-list { gap: 0; }
html body#martha-app.martha-design-system .client-table-scroll { max-width: 100%; overflow-x: auto; border: 1px solid var(--martha-ref-border); border-radius: 10px; }
html body#martha-app.martha-design-system .client-table .client-record-card { width: 100%; min-width: 170px; padding: 0; border: 0; background: transparent; text-align: left; }
html body#martha-app.martha-design-system .client-table .client-record-main strong { font-size: 13px; font-weight: 500; }
html body#martha-app.martha-design-system .client-table .client-record-avatar { flex: 0 0 30px; width: 30px; height: 30px; border: 1px solid var(--martha-ref-border); border-radius: 50%; color: var(--martha-ref-foreground); background: var(--martha-ref-accent); font-size: 11px; }
html body#martha-app.martha-design-system .client-table-contact { color: var(--martha-ref-muted-foreground); font-size: 12px; overflow-wrap: anywhere; }
html body#martha-app.martha-design-system .client-table-empty { padding: 40px 20px; color: var(--martha-ref-muted-foreground); font-size: 13px; text-align: center; }
html body#martha-app.martha-design-system .martha-page-orientation { margin: 0 0 24px; padding: 16px 20px; border: 1px solid var(--martha-ref-border); border-radius: 12px; background: var(--martha-ref-card); box-shadow: none; }
html body#martha-app.martha-design-system .martha-page-orientation h2 { font-size: 16px; }
html body#martha-app.martha-design-system .martha-page-orientation p { font-size: 12px; }
html body#martha-app.martha-design-system details.martha-page-orientation { display: block; padding: 0; background: transparent; }
html body#martha-app.martha-design-system .martha-page-orientation > summary { padding: 12px 16px; color: var(--martha-ref-foreground); cursor: pointer; font-size: 12px; }
html body#martha-app.martha-design-system .martha-page-orientation > summary span { float: right; color: var(--martha-ref-muted-foreground); font-size: 11px; }
html body#martha-app.martha-design-system .martha-page-orientation-copy { padding: 0 16px; }
html body#martha-app.martha-design-system .martha-page-orientation-steps { margin: 12px 16px 16px; border: 0; padding: 0; }
html body#martha-app.martha-design-system :is(.martha-client-tools-menu,.martha-command-results,.martha-more-drawer-panel,.martha-dialog,.martha-dialog-panel) { border: 1px solid var(--martha-ref-border); border-radius: 12px; background: var(--martha-ref-popover); color: var(--martha-ref-foreground); box-shadow: 0 20px 60px #0009; }
html body#martha-app.martha-design-system .martha-client-tools-menu { z-index: 50; bottom: calc(100% + 8px); padding: 6px; min-width: 210px; }
html body#martha-app.martha-design-system .martha-client-tools-menu button { display: block; width: 100%; border: 0; border-radius: 6px; padding: 10px; background: transparent; text-align: left; font-size: 13px; }
html body#martha-app.martha-design-system .martha-client-tools-menu button:hover { background: var(--martha-ref-accent); }

/* The live reference has no login screen: use its components on real auth. */
html body#martha-app.martha-auth-active .martha-auth-screen { min-height: 100dvh; padding: 32px 20px; background: var(--martha-ref-background); }
html body#martha-app.martha-auth-active .martha-auth-screen::before { display: none; }
html body#martha-app.martha-auth-active .martha-auth-layout { display: block; width: min(400px,100%); min-height: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; overflow: visible; }
html body#martha-app.martha-auth-active .martha-auth-layout::before { display: none; }
html body#martha-app.martha-auth-active .martha-auth-intro { display: none; }
html body#martha-app.martha-auth-active .martha-auth-card { width: 100%; margin: 0; padding: 28px; border: 1px solid var(--martha-ref-border); border-radius: 20px; background: var(--martha-ref-card); box-shadow: none; }
html body#martha-app.martha-auth-active .martha-auth-card-brand { margin-bottom: 28px; justify-content: center; }
html body#martha-app.martha-auth-active .martha-auth-logo { width: 72px; height: 72px; }
html body#martha-app.martha-auth-active .martha-auth-card-heading { text-align: center; }
html body#martha-app.martha-auth-active .martha-auth-card-heading h2 { font-size: 23px; font-weight: 500; letter-spacing: -.025em; }
html body#martha-app.martha-auth-active .martha-auth-card-heading p { color: var(--martha-ref-muted-foreground); font-size: 13px; line-height: 1.65; }
html body#martha-app.martha-auth-active :is(.martha-auth-provider,.martha-auth-preview) { min-height: 46px; border: 1px solid var(--martha-ref-border); border-radius: 10px; color: var(--martha-ref-foreground); background: var(--martha-ref-popover); box-shadow: none; }
html body#martha-app.martha-auth-active [data-auth-provider="google"]:not(:disabled) { color: var(--martha-ref-background); background: var(--martha-ref-foreground); }
html body#martha-app.martha-auth-active :is(.martha-auth-status,.martha-auth-footnote) { font-size: 11px; line-height: 1.6; color: var(--martha-ref-muted-foreground); }

@media (max-width: 1100px) {
  html body#martha-app.martha-design-system #view-martha .martha-chat-shell.martha-context-open { grid-template-columns: 280px minmax(0,1fr) !important; }
  html body#martha-app.martha-design-system #view-martha .martha-context-open .martha-chat-rail { position: absolute; z-index: 15; inset: 56px 0 0 auto; width: min(320px,100vw); height: calc(100dvh - 56px); box-shadow: -16px 0 40px #0009; }
}
@media (max-width: 1023px) {
  html body#martha-app.martha-design-system.martha-client-secondary .app-shell,
  html body#martha-app.martha-design-system #view-martha .martha-chat-shell,
  html body#martha-app.martha-design-system #view-martha .martha-chat-shell.martha-context-open { display: block !important; grid-template-columns: minmax(0,1fr) !important; }
  html body#martha-app.martha-design-system .app-shell > .sidebar,
  html body#martha-app.martha-design-system #view-martha .martha-chat-sidebar { position: fixed; z-index: 40; inset: 0 auto 0 0; width: min(280px,88vw) !important; height: 100dvh; transform: translateX(-105%); visibility: hidden; transition: transform .18s ease, visibility .18s ease; }
  html body#martha-app.martha-design-system .app-shell.martha-secondary-sidebar-open > .sidebar,
  html body#martha-app.martha-design-system #view-martha .martha-mobile-sidebar-open .martha-chat-sidebar { transform: translateX(0); visibility: visible; }
  html body#martha-app.martha-design-system :is(.martha-client-mobile-menu,.martha-secondary-mobile-menu) { display: grid; }
  html body#martha-app.martha-design-system #view-martha .martha-mobile-sidebar-open .martha-client-drawer-backdrop,
  html body#martha-app.martha-design-system .app-shell.martha-secondary-sidebar-open .martha-secondary-sidebar-backdrop { display: block; position: fixed; z-index: 39; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; background: #0009; }
}
@media (max-width: 640px) {
  html body#martha-app.martha-design-system :is(.martha-client-mobile-header,.topbar) { padding: 0 12px; }
  html body#martha-app.martha-design-system .top-actions .ghost { display: none; }
  html body#martha-app.martha-design-system.martha-client-secondary .martha-surface.active-view { padding: 24px 16px 40px; }
  html body#martha-app.martha-design-system #view-martha .martha-cockpit-welcome { margin-bottom: 28px; padding: 24px 16px 0; }
  html body#martha-app.martha-design-system #view-martha .martha-chat-feed { padding: 28px 16px; }
  html body#martha-app.martha-design-system #view-martha .martha-chat-composer-wrap { width: calc(100% - 32px); margin-bottom: max(16px,env(safe-area-inset-bottom)); }
  html body#martha-app.martha-design-system #view-martha .martha-chat-composer-left { display: contents; }
  html body#martha-app.martha-design-system #view-martha .martha-client-composer-primary { flex: 1 1 auto; min-width: 0; }
  html body#martha-app.martha-design-system #view-martha .martha-client-composer-secondary { flex: 0 1 auto; min-width: 0; }
  html body#martha-app.martha-design-system #view-martha .martha-client-menu[data-menu="autonomy"] [data-menu-label],
  html body#martha-app.martha-design-system #view-martha .martha-client-menu[data-menu="model"] [data-menu-label] {
    max-width: none; overflow: visible; font-size: 0; white-space: nowrap;
  }
  html body#martha-app.martha-design-system #view-martha .martha-client-menu[data-menu="autonomy"] [data-menu-label]::after { content: 'Mode'; font-size: 11px; }
  html body#martha-app.martha-design-system #view-martha .martha-client-menu[data-menu="model"] [data-menu-label]::after { content: 'Modèle'; font-size: 11px; }
  html body#martha-app.martha-design-system #view-martha .martha-chat-provider-notice { width: calc(100% - 32px); }
  html body#martha-app.martha-design-system #view-martha .martha-cockpit-welcome { gap: 14px; margin-bottom: 22px; padding-top: 20px; }
  html body#martha-app.martha-design-system #view-martha .martha-client-home-hero-art { width: 46px; height: 46px; flex-basis: 46px; border-radius: 14px; }
  html body#martha-app.martha-design-system #view-martha .martha-client-home-hero-mark { width: 30px; height: 30px; }
  html body#martha-app.martha-design-system #view-martha .martha-client-home-lead { max-width: 360px; font-size: 14px; }
  html body#martha-app.martha-design-system #view-martha .martha-client-home-meta { margin-top: 12px; font-size: 10px; }
  html body#martha-app.martha-design-system #view-martha .martha-client-home-deck { width: calc(100% - 32px); margin-bottom: 20px; }
  html body#martha-app.martha-design-system #view-martha .martha-client-home-section-heading { align-items: flex-start; flex-direction: column; gap: 2px; margin-bottom: 10px; }
  html body#martha-app.martha-design-system #view-martha .martha-client-home-section-note { font-size: 10px; }
  html body#martha-app.martha-design-system #view-martha .martha-client-home-actions { grid-template-columns: 1fr; gap: 6px; }
  html body#martha-app.martha-design-system #view-martha .martha-client-home-action { min-height: 60px; padding: 10px 11px; }
  html body#martha-app.martha-design-system .panel { padding: 16px; }
  html body#martha-app.martha-design-system .section-heading { flex-wrap: wrap; }
  html body#martha-app.martha-design-system :is(.martha-client-subnavigation,.martha-module-tabs) { overflow-x: auto; }
  html body#martha-app.martha-design-system .martha-client-subnavigation button { flex: 0 0 auto; }
  html body#martha-app.martha-auth-active .martha-auth-card { padding: 24px 20px; }
}
@media (prefers-reduced-motion: reduce) {
  html body#martha-app.martha-design-system *, html body#martha-app.martha-design-system *::before { transition: none !important; animation-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* P1-11 — Correctifs Sasha : elements du cockpit historique non couverts par la
   refonte P1-10 (grille de raccourcis, carte de mode en radio, pied de sidebar,
   en-tete redondant). Ces elements dupliquent des controles deja presents dans
   le nouveau composer/sidebar ; masques plutot que restyles pour eviter la
   redondance visuelle. */
html body#martha-app.martha-design-system #view-martha .martha-autonomy-card { display: none !important; }
html body#martha-app.martha-design-system #view-martha .martha-cockpit-quick-grid { display: none !important; }
html body#martha-app.martha-design-system #view-martha .martha-cockpit-sidebar-footer { display: none !important; }
html body#martha-app.martha-design-system #view-martha .martha-cockpit-header-mark { display: none !important; }
html body#martha-app.martha-design-system #view-martha .martha-cockpit-system-status { display: none !important; }

html body#martha-app.martha-design-system #view-martha .martha-cockpit-header {
  display: flex; align-items: center; gap: 12px; flex: 0 0 56px; width: 100%; height: 56px; min-height: 56px;
  margin: 0; padding: 0 20px; border: 0; border-bottom: 1px solid var(--martha-ref-border); border-radius: 0;
  background: var(--martha-ref-background) !important; box-shadow: none;
}
html body#martha-app.martha-design-system #view-martha .martha-command-search-wrap { flex: 1 1 auto; min-width: 0; }
html body#martha-app.martha-design-system #view-martha .martha-cockpit-header-actions { display: flex; align-items: center; flex: 0 0 auto; gap: 8px; margin-left: auto; }
html body#martha-app.martha-design-system #view-martha .martha-cockpit-notifications {
  display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 8px;
  color: var(--martha-ref-muted-foreground); background: transparent;
}
html body#martha-app.martha-design-system #view-martha .martha-cockpit-notifications:hover { color: var(--martha-ref-foreground); background: var(--martha-ref-accent); }
html body#martha-app.martha-design-system #view-martha .martha-cockpit-notifications svg { width: 18px; height: 18px; }
html body#martha-app.martha-design-system #view-martha .martha-cockpit-profile {
  display: flex; align-items: center; gap: 8px; padding: 4px 8px; border: 0; border-radius: 999px;
  color: var(--martha-ref-foreground); background: transparent;
}
html body#martha-app.martha-design-system #view-martha .martha-cockpit-profile:hover { background: var(--martha-ref-accent); }
html body#martha-app.martha-design-system #view-martha .martha-profile-avatar {
  display: grid; place-items: center; width: 28px; height: 28px; border: 1px solid var(--martha-ref-border);
  border-radius: 50%; color: var(--martha-ref-foreground); background: var(--martha-ref-accent); font-size: 11px;
}
html body#martha-app.martha-design-system #view-martha .martha-cockpit-profile small { display: none; }
html body#martha-app.martha-design-system #view-martha .martha-cockpit-profile b { font-size: 13px; font-weight: 500; }
html body#martha-app.martha-design-system #view-martha .martha-profile-chevron { width: 14px; height: 14px; color: var(--martha-ref-muted-foreground); }

/* Wordmark plus affirme (retour Sasha : trop petit, police datee). */
html body#martha-app.martha-design-system :is(.martha-client-brand-name,.martha-secondary-brand button > span:last-child,.martha-auth-card-brand strong,.martha-cockpit-brand strong) {
  font-family: var(--martha-ref-serif) !important; font-size: 30px !important; font-weight: 500 !important;
  letter-spacing: -.01em; color: var(--martha-ds-gold) !important;
}
html body#martha-app.martha-design-system .martha-cockpit-brand small { display: none; }

/* P1-11 — le logo hero de l'accueil/discussion vide etait recadre (ancien
   background-size:173px dans une boite de 94px, avec !important) et masque
   sous 820px de large (ancienne media query mobile). Reprend le pas avec
   !important + une taille "contain" pour voir le logo entier, sur toutes les
   largeurs. */
html body#martha-app.martha-design-system #view-martha .martha-cockpit-welcome :is(.martha-chat-brand-mark,.martha-cockpit-hero-logo) {
  display: block !important; width: 64px !important; height: 64px !important;
  background: url('/assets/martha-logo-transparent.png') center / contain no-repeat !important;
}

/* P1-12 — la salutation reste neutre et lisible : l'or est reserve aux
   signaux d'interaction, pas au texte principal de l'accueil. */
html body#martha-app.martha-design-system #view-martha .martha-cockpit-welcome h1,
html body#martha-app.martha-design-system #view-martha .martha-cockpit-welcome h1 span {
  background: none;
  -webkit-text-fill-color: currentColor;
  color: var(--martha-ref-foreground) !important;
}
html body#martha-app.martha-design-system :is(.martha-client-brand-name,.martha-secondary-brand button > span:last-child,.martha-cockpit-brand strong) { display: none !important; }

html body#martha-app.martha-design-system #view-martha .martha-chat-message-actions {
  display: flex; gap: 4px; margin-top: 6px; opacity: 1;
}
html body#martha-app.martha-design-system #view-martha .martha-chat-message-action {
  display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 10px; border: 1px solid var(--martha-ref-border);
  border-radius: 999px; color: var(--martha-ref-muted-foreground); background: transparent; font-size: 12px;
}
html body#martha-app.martha-design-system #view-martha .martha-chat-message-action:hover { color: var(--martha-ref-foreground); background: var(--martha-ref-accent); border-color: rgba(255,255,255,.25); }
html body#martha-app.martha-design-system #view-martha .martha-client-tools-menu [data-autonomy-value].is-selected,
html body#martha-app.martha-design-system #view-martha .martha-client-tools-menu [data-model-value].is-selected {
  color: var(--martha-ref-foreground); background: var(--martha-ref-accent); font-weight: 500;
}

/* P1-12 — "Mode d'emploi" et autres pages metier : boutons d'action de type
   lien restaient bleus (ancienne couleur d'accent), non couverts par
   .primary/.ghost/.text-button. Filet de securite generique sur tout lien/
   bouton-lien de l'app. */
html body#martha-app.martha-design-system a,
html body#martha-app.martha-design-system :is(.martha-guide-action,.martha-guide-prompt-action) {
  color: var(--martha-ref-foreground);
}
html body#martha-app.martha-design-system :is(.martha-guide-action,.martha-guide-prompt-action) {
  display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 7px 12px;
  border: 1px solid var(--martha-ref-border); border-radius: 8px; background: transparent; font-size: 13px;
}
html body#martha-app.martha-design-system :is(.martha-guide-action,.martha-guide-prompt-action):hover { background: var(--martha-ref-accent); }
html body#martha-app.martha-design-system .martha-guide-card-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }

/* P1-13 — secondary surfaces share one calm editorial frame. The runtime may
   expose many modules, but the eye should encounter one Martha workspace:
   breadcrumb, purpose, content, then action. */
html body#martha-app.martha-design-system.martha-client-secondary .martha-module-chrome {
  display: flex; align-items: center; gap: 8px; min-height: 30px; margin: 0 0 22px;
  color: var(--martha-ref-muted-foreground); font-size: 11px;
}
html body#martha-app.martha-design-system.martha-client-secondary .martha-module-back {
  display: inline-flex; align-items: center; gap: 6px; min-height: 30px; padding: 5px 8px;
  border: 1px solid var(--martha-ref-border); border-radius: 8px; color: var(--martha-ref-muted-foreground);
  background: transparent; font-size: 12px;
}
html body#martha-app.martha-design-system.martha-client-secondary .martha-module-back:hover {
  color: var(--martha-ref-foreground); background: var(--martha-ref-accent);
}
html body#martha-app.martha-design-system.martha-client-secondary .martha-module-back svg { width: 14px; height: 14px; }
html body#martha-app.martha-design-system.martha-client-secondary .martha-module-divider { opacity: .35; }
html body#martha-app.martha-design-system.martha-client-secondary .martha-module-current {
  color: var(--martha-ref-foreground); font-weight: 500;
}
html body#martha-app.martha-design-system.martha-client-secondary .martha-module-context {
  display: inline-flex; align-items: center; gap: 6px; margin-left: auto; color: var(--martha-ref-muted-foreground);
}
html body#martha-app.martha-design-system.martha-client-secondary .martha-module-context-dot {
  width: 5px; height: 5px; border-radius: 50%; background: var(--martha-ref-muted-foreground);
}
html body#martha-app.martha-design-system.martha-client-secondary .martha-surface-heading {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 24px;
}
html body#martha-app.martha-design-system.martha-client-secondary .martha-surface-heading > div:first-child { min-width: 0; }
html body#martha-app.martha-design-system.martha-client-secondary .martha-surface-heading h2 {
  max-width: 760px; font-size: clamp(24px, 3vw, 32px); line-height: 1.12; letter-spacing: -.035em;
}
html body#martha-app.martha-design-system.martha-client-secondary .martha-surface-heading > .pill { flex: 0 0 auto; margin-top: 4px; }
html body#martha-app.martha-design-system.martha-client-secondary .martha-surface-actions {
  display: flex; flex: 0 0 auto; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-top: 2px;
}
html body#martha-app.martha-design-system.martha-client-secondary .martha-surface-actions :is(.martha-surface-chat,.martha-surface-help) {
  display: inline-flex; align-items: center; gap: 7px; min-height: 32px; padding: 6px 10px;
  border: 1px solid var(--martha-ref-border); border-radius: 8px; color: var(--martha-ref-muted-foreground);
  background: transparent; font-size: 11px;
}
html body#martha-app.martha-design-system.martha-client-secondary .martha-surface-actions :is(.martha-surface-chat,.martha-surface-help):hover {
  color: var(--martha-ref-foreground); border-color: var(--martha-ref-line-strong, var(--martha-ref-ring));
  background: var(--martha-ref-accent);
}
html body#martha-app.martha-design-system.martha-client-secondary .martha-surface-actions svg { width: 14px; height: 14px; }
html body#martha-app.martha-design-system.martha-client-secondary .two-columns {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 16px; min-width: 0;
}
html body#martha-app.martha-design-system.martha-client-secondary .two-columns + .two-columns,
html body#martha-app.martha-design-system.martha-client-secondary > .martha-surface > .panel + .panel { margin-top: 16px; }
html body#martha-app.martha-design-system.martha-client-secondary .panel {
  min-width: 0; padding: 18px; border-radius: 12px; background: var(--martha-ref-card);
}
html body#martha-app.martha-design-system.martha-client-secondary .panel-heading {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 16px;
}
html body#martha-app.martha-design-system.martha-client-secondary .panel-heading > div { min-width: 0; }
html body#martha-app.martha-design-system.martha-client-secondary .panel-heading h3 { font-size: 15px; }
html body#martha-app.martha-design-system.martha-client-secondary .list { min-width: 0; }
html body#martha-app.martha-design-system.martha-client-secondary .list.empty {
  min-height: 44px; display: grid; place-items: center; padding: 14px; border: 1px dashed var(--martha-ref-border);
  border-radius: 8px; color: var(--martha-ref-muted-foreground); background: transparent; font-size: 12px; text-align: center;
}
html body#martha-app.martha-design-system.martha-client-secondary .metric-grid {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 0 0 18px;
}
html body#martha-app.martha-design-system.martha-client-secondary .metric {
  min-width: 0; padding: 16px; border-radius: 12px; background: var(--martha-ref-card);
}
html body#martha-app.martha-design-system.martha-client-secondary .metric span,
html body#martha-app.martha-design-system.martha-client-secondary .metric small {
  display: block; color: var(--martha-ref-muted-foreground); font-size: 11px; line-height: 1.45;
}
html body#martha-app.martha-design-system.martha-client-secondary .metric strong {
  display: block; margin: 6px 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: var(--martha-ref-foreground); font-size: 22px; font-weight: 500;
}
html body#martha-app.martha-design-system.martha-client-secondary .health-card {
  display: flex; align-items: flex-start; gap: 12px; padding: 18px; border-radius: 12px; background: var(--martha-ref-card);
}
html body#martha-app.martha-design-system.martha-client-secondary .health-card .status-dot {
  flex: 0 0 7px; width: 7px; height: 7px; margin-top: 7px; border-radius: 50%; background: var(--martha-ref-muted-foreground);
}

@media (max-width: 760px) {
  html body#martha-app.martha-design-system.martha-client-secondary .martha-surface-heading { flex-direction: column; gap: 14px; }
  html body#martha-app.martha-design-system.martha-client-secondary .martha-surface-heading > .pill { margin-top: 0; }
  html body#martha-app.martha-design-system.martha-client-secondary .martha-surface-actions { justify-content: flex-start; }
  html body#martha-app.martha-design-system.martha-client-secondary .martha-module-context { display: none; }
  html body#martha-app.martha-design-system.martha-client-secondary .two-columns,
  html body#martha-app.martha-design-system.martha-client-secondary .metric-grid { grid-template-columns: 1fr; }
}

/* P1-14 — Discussion / écran de référence validé.
   Cette passe reste strictement dans .martha-client-chat : les surfaces métier
   gardent les variables et le travail visuel existants jusqu'à validation de
   cette première tranche. Palette chaude, marque serif et contrôles pilule
   suivent la charte de la maquette du 24 septembre. */
html body#martha-app.martha-design-system.martha-client-chat {
  color-scheme: light;
  --martha-ref-background: #FAF6EE;
  --martha-ref-foreground: #2A2420;
  --martha-ref-card: #FFFDF8;
  --martha-ref-popover: #FFFDF8;
  --martha-ref-elevated: #F8F1E4;
  --martha-ref-muted-foreground: #8A7F6E;
  --martha-ref-accent: #F3E5C8;
  --martha-ref-border: #E8DFCC;
  --martha-ref-input: #DCCBAE;
  --martha-ref-ring: #C89A4A;
  --martha-ref-sidebar: #F5EEE0;
  --martha-ref-destructive: #A85A4C;
  --martha-ref-gold: #B8863A;
  --martha-ref-gold-bright: #E9C876;
  --martha-ref-sans: Geist, ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --martha-ref-serif: 'Instrument Serif', Georgia, serif;
  --martha-ds-bg: var(--martha-ref-background);
  --martha-ds-bg-raised: var(--martha-ref-card);
  --martha-ds-surface: var(--martha-ref-card);
  --martha-ds-surface-raised: var(--martha-ref-elevated);
  --martha-ds-surface-hover: var(--martha-ref-accent);
  --martha-ds-ink-strong: var(--martha-ref-foreground);
  --martha-ds-ink: var(--martha-ref-foreground);
  --martha-ds-ink-soft: var(--martha-ref-gold);
  --martha-ds-muted: var(--martha-ref-muted-foreground);
  --martha-ds-faint: var(--martha-ref-muted-foreground);
  --martha-ds-line: var(--martha-ref-border);
  --martha-ds-line-strong: #D5B778;
  --martha-ds-gold: var(--martha-ref-gold);
  --martha-ds-gold-bright: var(--martha-ref-gold-bright);
  --martha-ds-red: var(--martha-ref-destructive);
  --martha-client-bg: var(--martha-ref-background);
  --martha-client-surface: var(--martha-ref-card);
  --martha-client-surface-soft: rgba(255, 253, 248, .76);
  --martha-client-line: var(--martha-ref-border);
  --martha-client-line-soft: rgba(232, 223, 204, .7);
  --martha-client-text: var(--martha-ref-foreground);
  --martha-client-muted: var(--martha-ref-muted-foreground);
  --martha-client-subtle: #9A8D79;
  --martha-client-gold: var(--martha-ref-gold);
  --martha-client-gold-light: var(--martha-ref-gold-bright);
  --martha-client-gold-bright: var(--martha-ref-gold-bright);
  --martha-client-green: #66805D;
  --martha-cockpit-bg: var(--martha-ref-background);
  --martha-cockpit-sidebar: var(--martha-ref-sidebar);
  --martha-cockpit-card: var(--martha-ref-card);
  --martha-cockpit-card-2: #FBF5E9;
  --martha-cockpit-border: var(--martha-ref-border);
  --martha-cockpit-border-soft: var(--martha-client-line-soft);
  --martha-cockpit-text: var(--martha-ref-foreground);
  --martha-cockpit-muted: var(--martha-ref-muted-foreground);
  --martha-cockpit-gold: var(--martha-ref-gold);
  --martha-cockpit-gold-light: var(--martha-ref-gold-bright);
  --martha-cockpit-green: #66805D;
}

html body#martha-app.martha-design-system.martha-client-chat,
html body#martha-app.martha-design-system.martha-client-chat .app-shell,
html body#martha-app.martha-design-system.martha-client-chat .app-shell > .main,
html body#martha-app.martha-design-system.martha-client-chat #view-martha,
html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-shell {
  background: var(--martha-ref-background) !important;
  color: var(--martha-ref-foreground);
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-shell {
  background:
    radial-gradient(circle at 63% 11%, rgba(233, 200, 118, .17), transparent 28%),
    linear-gradient(180deg, #FAF6EE 0%, #F5EEE0 100%) !important;
}


html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-cockpit-main {
  background:
    radial-gradient(circle at 50% 9%, rgba(233, 200, 118, .22), transparent 33%),
    linear-gradient(180deg, #FAF6EE 0%, #F5EEE0 100%);
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-cockpit-welcome {
  position: relative;
  max-width: 820px;
  min-height: 0;
  margin: auto auto 22px;
  padding: clamp(46px, 9vh, 92px) 28px 0;
  gap: 22px;
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-cockpit-welcome :is(h1,h1 span) {
  color: var(--martha-ref-foreground) !important;
  font-family: var(--martha-ref-serif) !important;
  font-size: clamp(34px, 4vw, 52px);
  font-weight: 400;
  letter-spacing: -.025em;
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-client-home-hero-copy {
  position: relative;
  z-index: 2;
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-client-home-kicker {
  color: var(--martha-ref-gold);
  font-size: 10px;
  letter-spacing: .16em;
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-client-home-lead {
  color: var(--martha-ref-muted-foreground);
  font-size: 15px;
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-client-home-meta {
  color: var(--martha-ref-muted-foreground);
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-client-home-meta-dot {
  background: var(--martha-ref-muted-foreground);
  box-shadow: 0 0 0 4px rgba(255, 255, 255, .12);
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-client-home-hero-art {
  z-index: 1;
  width: 176px;
  height: 176px;
  flex-basis: 176px;
  border: 0;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(244, 218, 158, .34) 0, rgba(244, 218, 158, .12) 31%, transparent 67%);
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-client-home-hero-art .martha-client-home-orbit {
  display: block !important;
  position: absolute;
  border: 1px solid rgba(184, 134, 58, .28);
  border-radius: 50%;
  transform: rotate(-14deg);
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-client-home-hero-art .orbit-one { inset: 9px 16px; }
html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-client-home-hero-art .orbit-two { inset: 27px 2px; border-style: dashed; opacity: .75; transform: rotate(18deg); }
html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-client-home-hero-art .orbit-three { inset: 48px 34px; border-color: rgba(184, 134, 58, .2); transform: rotate(-28deg); }

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-client-home-hero-mark {
  position: relative;
  z-index: 2;
  width: 96px;
  height: 96px;
  background-size: auto 190px;
  background-position: center 51%;
  filter: drop-shadow(0 10px 12px rgba(154, 111, 39, .16));
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-client-home-deck {
  width: min(calc(100% - 56px), 720px);
  margin-bottom: 24px;
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-client-home-actions {
  gap: 12px;
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-client-home-action {
  grid-template-columns: 34px minmax(0, 1fr) 16px;
  min-height: 78px;
  padding: 14px 16px;
  border-color: var(--martha-ref-border);
  border-radius: 20px;
  color: var(--martha-ref-foreground);
  background: rgba(255, 253, 248, .78);
  box-shadow: 0 10px 24px rgba(126, 91, 38, .07);
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-client-home-action:hover,
html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-client-home-action:focus-visible {
  border-color: rgba(184, 134, 58, .58);
  background: #FFFDF8;
  box-shadow: 0 14px 28px rgba(126, 91, 38, .1);
  transform: translateY(-1px);
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-client-home-action-icon {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 12px;
  color: var(--martha-ref-gold);
  background: #F8EED8;
  font-size: 16px;
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-client-home-action.is-featured {
  border-color: rgba(184, 134, 58, .48);
  background: linear-gradient(135deg, rgba(244, 218, 158, .42), rgba(255, 253, 248, .86));
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-client-home-action b {
  font-size: 13px;
  font-weight: 600;
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-client-home-action small,
html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-client-home-action-arrow {
  color: var(--martha-ref-muted-foreground);
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-feed {
  width: min(100%, 820px);
  max-width: none;
  padding: 32px 28px;
  scrollbar-color: #D7C6A6 transparent;
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-message {
  margin-bottom: 26px;
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-message-bubble {
  color: var(--martha-ref-foreground);
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-message.user .martha-chat-message-bubble {
  border-radius: 22px 22px 6px 22px;
  color: var(--martha-ref-foreground);
  background: #F4E1B7;
  box-shadow: 0 8px 18px rgba(126, 91, 38, .08);
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-message-label,
html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-message-meta {
  color: var(--martha-ref-muted-foreground);
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha [class*="-chat-card"] .martha-chat-message-bubble {
  border-color: var(--martha-ref-border);
  border-radius: 20px;
  background: var(--martha-ref-card);
  box-shadow: 0 12px 28px rgba(126, 91, 38, .07);
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-message-action {
  border-color: var(--martha-ref-border);
  color: var(--martha-ref-muted-foreground);
  background: rgba(255, 253, 248, .7);
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-message-action:hover,
html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-message-action:focus-visible {
  border-color: rgba(184, 134, 58, .58);
  color: var(--martha-ref-foreground);
  background: #F8EED8;
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-composer-wrap {
  width: min(calc(100% - 56px), 760px);
  max-width: none;
  margin: 0 auto 28px;
  padding: 0;
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-composer {
  width: 100%;
  padding: 9px;
  border: 1px solid var(--martha-ref-input) !important;
  border-radius: 28px;
  background: rgba(255, 253, 248, .94) !important;
  box-shadow: 0 16px 34px rgba(126, 91, 38, .1), inset 0 1px rgba(255, 255, 255, .76);
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-composer:focus-within {
  border-color: var(--martha-ref-ring) !important;
  box-shadow: 0 16px 34px rgba(126, 91, 38, .1), 0 0 0 4px rgba(200, 154, 74, .14);
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-composer textarea {
  min-height: 44px;
  padding: 11px 13px 7px;
  color: var(--martha-ref-foreground);
  font-size: 15px;
  line-height: 1.55;
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-composer textarea::placeholder {
  color: var(--martha-ref-muted-foreground);
  opacity: .86;
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-composer-tools {
  gap: 7px;
  padding: 4px 4px 2px;
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha :is(.martha-client-composer-plus,.martha-client-tool-toggle,.martha-chat-tool,.martha-client-select select) {
  min-height: 32px;
  border: 1px solid var(--martha-ref-border);
  border-radius: 999px;
  color: var(--martha-ref-muted-foreground);
  background: #FAF6EE;
  font-size: 12px;
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha :is(.martha-client-composer-plus,.martha-client-tool-toggle,.martha-chat-tool,.martha-client-select select):hover,
html body#martha-app.martha-design-system.martha-client-chat #view-martha :is(.martha-client-composer-plus,.martha-client-tool-toggle,.martha-chat-tool,.martha-client-select select):focus-visible {
  border-color: rgba(184, 134, 58, .58);
  color: var(--martha-ref-foreground);
  background: #F8EED8;
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-client-composer-plus,
html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-tool {
  width: 32px;
  padding: 7px;
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-client-menu [data-menu-toggle]::after {
  margin-left: 2px;
  color: var(--martha-ref-gold);
  content: '⌄';
  font-size: 12px;
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-client-tools-menu {
  border-color: var(--martha-ref-border);
  border-radius: 16px;
  background: var(--martha-ref-popover);
  box-shadow: 0 16px 34px rgba(126, 91, 38, .14);
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-client-tools-menu button:hover,
html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-client-tools-menu button:focus-visible,
html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-client-tools-menu [data-autonomy-value].is-selected {
  color: var(--martha-ref-foreground);
  background: #F8EED8;
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha :is(.martha-chat-send,.martha-chat-stop) {
  width: 38px;
  height: 38px;
  border: 0;
  color: #FFFDF8;
  background: linear-gradient(135deg, #B8863A, #D9AE5B) !important;
  box-shadow: 0 8px 16px rgba(140, 99, 34, .18);
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-send:disabled {
  color: var(--martha-ref-muted-foreground);
  background: #EDE3D1 !important;
  box-shadow: none;
  opacity: 1;
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-disclaimer,
html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-provider-notice {
  color: var(--martha-ref-muted-foreground);
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-provider-notice {
  border-color: var(--martha-ref-border);
  border-radius: 999px;
  background: rgba(255, 253, 248, .7);
  box-shadow: 0 8px 18px rgba(126, 91, 38, .06);
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-rail {
  border-left-color: var(--martha-ref-border);
  background: var(--martha-ref-sidebar);
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-client-context {
  border-color: var(--martha-ref-border);
  border-radius: 20px;
  background: rgba(255, 253, 248, .8);
  box-shadow: 0 12px 28px rgba(126, 91, 38, .08);
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-client-context-item {
  border-color: var(--martha-ref-border);
  border-radius: 14px;
  color: var(--martha-ref-foreground);
  background: rgba(250, 246, 238, .78);
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-client-context-icon {
  border-radius: 11px;
  color: var(--martha-ref-gold);
  background: #F8EED8;
}

@media (max-width: 1023px) {
  html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-sidebar {
    box-shadow: 20px 0 46px rgba(126, 91, 38, .16);
  }
  html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-mobile-sidebar-open .martha-client-drawer-backdrop {
    background: rgba(100, 75, 34, .2);
  }
}

@media (max-width: 640px) {
  html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-cockpit-welcome {
    min-height: 0;
    margin-bottom: 18px;
    padding: 28px 16px 0;
    gap: 14px;
  }
  html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-client-home-hero-art {
    width: 124px;
    height: 124px;
    flex-basis: 124px;
  }
  html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-client-home-hero-mark {
    width: 72px;
    height: 72px;
    background-size: auto 148px;
  }
  html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-client-home-deck,
  html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-composer-wrap {
    width: calc(100% - 32px);
  }
  html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-client-home-actions {
    grid-template-columns: 1fr;
  }
  html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-client-home-action {
    min-height: 70px;
  }
  html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-feed {
    padding: 24px 16px;
  }
  html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-composer-wrap {
    margin-bottom: max(16px, env(safe-area-inset-bottom));
  }
  html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-composer-tools {
    align-items: center;
  }
  html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-client-composer-primary {
    flex: 1 1 auto;
    min-width: 0;
  }
}

/* VISUEL-03 — verrouillage de la palette chaude de la charte mise à jour. */
html body#martha-app.martha-design-system.martha-client-chat {
  --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: #F8EED8;
  --martha-ref-border: #E8DFCC;
  --martha-ref-input: #E8D5AC;
  --martha-ref-gold: #B8863A;
  --martha-ref-gold-bright: #E9C876;
  background: #FAF6EE !important;
  color: #2A2420;
}

html body#martha-app.martha-design-system.martha-client-chat :is(.app-shell,.app-shell > .main,#view-martha.active-view,#view-martha .martha-chat-view,#view-martha .martha-chat-shell) {
  background: #FAF6EE !important;
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-main {
  background:
    radial-gradient(circle at 50% 46%, rgba(255, 253, 248, .98) 0, rgba(255, 253, 248, .54) 37%, transparent 70%),
    #FAF6EE !important;
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-reference-chat-tabs button {
  color: #8A7F6E;
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-reference-chat-hero h1,
html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-composer textarea {
  color: #2A2420 !important;
}

/* VISUEL-02 — Discussion/chat, reproduction de la maquette blanche et or.
   Cette couche reste limitée au shell client Martha et conserve les routes
   réelles derrière les contrôles de navigation de la maquette. */
html body#martha-app.martha-design-system.martha-client-chat {
  color-scheme: light;
  --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;
  background: #FBFAF7 !important;
  color: #171717;
}

html body#martha-app.martha-design-system.martha-client-chat .app-shell,
html body#martha-app.martha-design-system.martha-client-chat .app-shell > .main,
html body#martha-app.martha-design-system.martha-client-chat #view-martha.active-view,
html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-view,
html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-shell {
  background: #FBFAF7 !important;
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-shell {
  position: relative;
  display: block !important;
  width: 100%;
  height: 100dvh !important;
  min-height: 0;
  overflow: hidden;
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-main {
  position: relative;
  display: flex;
  width: 100%;
  height: 100dvh;
  min-height: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 46%, rgba(255, 255, 255, .96) 0, rgba(255, 255, 255, .48) 37%, transparent 70%),
    #FBFAF7 !important;
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-main::before,
html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-main::after {
  position: absolute;
  z-index: 0;
  display: block;
  border: 1px solid rgba(238, 209, 132, .54);
  border-radius: 50%;
  content: '';
  pointer-events: none;
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-main::before {
  width: 390px;
  height: 390px;
  top: -185px;
  right: -82px;
  box-shadow: 0 0 42px rgba(242, 218, 159, .22);
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-main::after {
  width: 480px;
  height: 480px;
  bottom: -294px;
  left: -242px;
  box-shadow: 0 0 44px rgba(242, 218, 159, .2);
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-sidebar {
  z-index: 40;
  background: rgba(255, 253, 249, .98) !important;
  border-right: 1px solid var(--martha-ref-border);
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-client-mobile-header {
  position: relative;
  z-index: 4;
  display: grid !important;
  grid-template-columns: 72px minmax(0, 1fr) 72px;
  align-items: center;
  flex: 0 0 126px;
  gap: 22px;
  width: 100%;
  height: 126px;
  min-height: 126px;
  margin: 0;
  padding: 38px 26px 0;
  border: 0;
  background: transparent !important;
}

/* P6 — un même accès Chat/Travail et aux discussions courantes sur téléphone et ordinateur. */
html body#martha-app.martha-design-system .martha-app-mode-switch { display: flex; align-items: center; flex: 0 0 auto; margin: 0 12px; }
html body#martha-app.martha-design-system .martha-chat-mode-switch { display: grid; grid-template-columns: 1fr 1fr; align-items: center; width: 164px; height: 36px; padding: 2px; border: 1px solid var(--martha-ref-border); border-radius: 999px; background: var(--martha-ref-card); }
html body#martha-app.martha-design-system .martha-chat-mode-switch button { display: grid; place-items: center; width: 100%; height: 30px; min-height: 30px; padding: 0 8px; border: 0; border-radius: 999px; color: var(--martha-ref-muted-foreground); background: transparent; font: 500 13px/1 var(--martha-ref-sans); }
html body#martha-app.martha-design-system .martha-chat-mode-switch button.active,
html body#martha-app.martha-design-system .martha-chat-mode-switch button[aria-selected="true"] { color: #75460F; border: 1px solid #D9A84A; background: linear-gradient(180deg,#FFF7E8 0%,#F4D78E 100%); }
html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-client-mobile-header { display: grid !important; grid-template-columns: 40px minmax(0,1fr) 72px; align-items: center; flex: 0 0 58px; gap: 8px; height: 58px; min-height: 58px; padding: 0 12px; background: var(--martha-ref-background) !important; }
html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-client-mobile-header .martha-chat-mode-switch { justify-self: center; width: min(100%, 184px); }
html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-client-mobile-header .martha-client-mobile-menu { display: grid !important; width: 36px; height: 36px; min-width: 36px; min-height: 36px; padding: 8px; border: 0; border-radius: 8px; background: transparent; box-shadow: none; }
html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-client-mobile-actions { display: flex; align-items: center; justify-content: flex-end; gap: 2px; width: 72px; height: 40px; }
html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-client-mobile-actions .martha-client-mobile-new { display: grid !important; place-items: center; flex: 0 0 36px; width: 36px; height: 36px; min-width: 36px; min-height: 36px; padding: 8px; border: 0; border-radius: 8px; color: var(--martha-ref-muted-foreground); background: transparent; box-shadow: none; }
html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-client-mobile-actions .martha-client-mobile-browser { display: grid !important; place-items: center; flex: 0 0 32px; width: 32px; height: 32px; min-width: 32px; min-height: 32px; padding: 7px; border: 0; border-radius: 8px; color: var(--martha-ref-muted-foreground); background: transparent; box-shadow: none; }
html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-client-mobile-actions :is(.martha-client-mobile-new,.martha-client-mobile-browser):hover,
html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-client-mobile-actions :is(.martha-client-mobile-new,.martha-client-mobile-browser):focus-visible { color: var(--martha-ref-foreground); background: var(--martha-ref-accent); outline: none; }
html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-client-mobile-actions .martha-client-mobile-new svg { width: 18px; height: 18px; }
html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-client-mobile-actions .martha-client-mobile-browser svg { width: 16px; height: 16px; }
@media (max-width: 760px) { html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-sidebar .martha-sidebar-browser { display: none !important; } }
html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-cockpit-shell.martha-mobile-sidebar-open .martha-client-mobile-browser { display: none !important; }
html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-cockpit-shell.martha-mobile-sidebar-open .martha-chat-sidebar .martha-sidebar-browser { display: grid !important; }
html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-current-toolbar { position: relative; z-index: 3; display: flex; align-items: center; flex: 0 0 46px; min-height: 46px; gap: 8px; padding: 3px 16px 6px; border-bottom: 1px solid var(--martha-ref-border); background: var(--martha-ref-background); }
html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-current-copy { flex: 1 1 auto; min-width: 0; }
html body#martha-app.martha-design-system.martha-client-chat #view-martha #martha-chat-header-title { display: block; max-width: 100%; margin: 0; overflow: hidden; color: var(--martha-ref-foreground); font: 500 14px/20px var(--martha-ref-sans); text-overflow: ellipsis; white-space: nowrap; }
html body#martha-app.martha-design-system.martha-client-chat #view-martha #martha-chat-header-meta { display: block; max-width: 100%; margin: 0; overflow: hidden; color: var(--martha-ref-muted-foreground); font: 400 11px/15px var(--martha-ref-sans); text-overflow: ellipsis; white-space: nowrap; }
html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-current-actions-toggle { display: grid; place-items: center; flex: 0 0 32px; width: 32px; height: 32px; min-height: 32px; padding: 0; border: 1px solid var(--martha-ref-border); border-radius: 9px; color: var(--martha-ref-foreground); background: var(--martha-ref-card); font-size: 22px; line-height: 1; }
html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-current-actions-toggle svg { width: 18px; height: 18px; }
html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-current-actions-menu { position: absolute; z-index: 25; top: 40px; right: 12px; display: grid; width: min(250px, calc(100vw - 28px)); padding: 6px; border: 1px solid var(--martha-ref-border); border-radius: 12px; background: var(--martha-ref-popover); box-shadow: 0 12px 32px rgba(42,36,32,.14); }
html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-current-actions-menu button { min-height: 36px; padding: 7px 10px; border: 0; border-radius: 7px; color: var(--martha-ref-foreground); background: transparent; text-align: left; font: 400 13px/20px var(--martha-ref-sans); }
html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-current-actions-menu button:hover { background: var(--martha-ref-accent); }
html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-client-recent { min-width: 0; }
html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-list-group { margin: 12px 0 8px; min-width: 0; }
html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-list-group > h3,
html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-trash-section > h3 { margin: 0; padding: 2px 8px 5px; color: var(--martha-ref-muted-foreground); font: 600 10px/16px var(--martha-ref-sans); letter-spacing: .07em; text-transform: uppercase; }
html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-history-search { display: block; margin: 6px 0 12px; padding: 0; }
html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-history-input { width: 100%; height: 34px; min-height: 34px; padding: 0 10px; border: 1px solid var(--martha-ref-border); border-radius: 9px; color: var(--martha-ref-foreground); background: var(--martha-ref-card); font: 400 12px/18px var(--martha-ref-sans); }
html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-conversation-row { display: flex; align-items: center; gap: 2px; width: 100%; min-width: 0; margin: 2px 0; padding: 1px 2px 1px 0; border-radius: 9px; }
html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-conversation-row:hover { background: var(--martha-ref-accent); }
html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-conversation { flex: 1 1 auto; min-width: 0; min-height: 36px; gap: 7px; padding: 4px 5px; border: 0; border-radius: 8px; background: transparent; text-align: left; }
html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-conversation.active { background: var(--martha-ref-accent); }
html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-conversation-dot { display: none; }
html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-conversation-title { font-size: 12px; }
html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-conversation-meta { font-size: 10px; }
html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-conversation-actions { display: flex; flex: 0 0 auto; align-items: center; gap: 0; opacity: .76; }
html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-conversation-action { display: grid; place-items: center; flex: 0 0 26px; width: 26px; height: 26px; min-height: 26px; padding: 3px; border: 0; border-radius: 6px; color: var(--martha-ref-muted-foreground); background: transparent; font-size: 15px; line-height: 1; }
html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-conversation-action:hover { color: var(--martha-ref-foreground); background: var(--martha-ref-card); }
html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-conversation-action svg { width: 15px; height: 15px; }
html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-trash-toggle { width: 100%; min-height: 32px; margin: 6px 0 2px; padding: 5px 8px; border: 0; border-radius: 7px; color: var(--martha-ref-muted-foreground); background: transparent; text-align: left; font: 400 12px/20px var(--martha-ref-sans); }
html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-trash-toggle:hover { color: var(--martha-ref-foreground); background: var(--martha-ref-accent); }
html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-trash-section { margin-top: 7px; padding-top: 8px; border-top: 1px solid var(--martha-ref-border); }
html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-conversation-row.is-trashed .martha-chat-conversation-title { color: var(--martha-ref-muted-foreground); }
html body#martha-app.martha-design-system .martha-chat-delete-dialog { width: min(420px, calc(100vw - 32px)); padding: 22px; border: 1px solid var(--martha-ref-border); border-radius: 18px; color: var(--martha-ref-foreground); background: var(--martha-ref-card); box-shadow: 0 22px 70px rgba(42,36,32,.22); }
html body#martha-app.martha-design-system .martha-chat-delete-dialog::backdrop { background: rgba(42,36,32,.28); }
html body#martha-app.martha-design-system .martha-chat-delete-dialog h2 { margin: 4px 0 8px; font: 500 18px/1.3 var(--martha-ref-sans); }
html body#martha-app.martha-design-system .martha-chat-delete-dialog p:not(.martha-cockpit-eyebrow) { color: var(--martha-ref-muted-foreground); font: 400 13px/1.5 var(--martha-ref-sans); }
html body#martha-app.martha-design-system .martha-chat-delete-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }
html body#martha-app.martha-design-system .martha-chat-delete-actions button { min-height: 36px; padding: 7px 11px; border-radius: 9px; font: 500 12px/18px var(--martha-ref-sans); }
html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-cockpit-welcome { inset-block-start: 104px; }
@media (max-width: 760px) {
  html body#martha-app.martha-design-system .martha-app-mode-switch { display: flex !important; margin: 0 4px; }
  html body#martha-app.martha-design-system .topbar .martha-chat-mode-switch { width: 128px; }
  html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-current-toolbar { padding-inline: 12px; }
  html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-cockpit-welcome { inset-block-start: 104px; }
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-client-mobile-header > :is(.martha-client-mobile-menu,.martha-client-mobile-new) {
  display: grid !important;
  place-items: center;
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  padding: 9px;
  border: 1px solid #E8D5AC;
  border-radius: 50%;
  color: #8A581A;
  background: rgba(255, 253, 249, .72);
  box-shadow: 0 8px 22px rgba(166, 112, 29, .08);
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-client-mobile-header > :is(.martha-client-mobile-menu,.martha-client-mobile-new):hover,
html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-client-mobile-header > :is(.martha-client-mobile-menu,.martha-client-mobile-new):focus-visible {
  color: #75460F;
  border-color: #C8953B;
  background: #FFFDF9;
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-client-mobile-header > :is(.martha-client-mobile-menu,.martha-client-mobile-new) svg {
  width: 18px;
  height: 18px;
  stroke-width: 1.65;
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-client-mobile-header .martha-context-toggle {
  display: none !important;
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-reference-chat-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  justify-self: center;
  width: min(100%, 220px);
  height: 42px;
  padding: 3px;
  border: 1px solid #E4DED4;
  border-radius: 999px;
  background: rgba(255, 253, 249, .68);
  box-shadow: inset 0 1px 2px rgba(86, 60, 21, .04);
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-reference-chat-tabs button {
  width: 100%;
  height: 36px;
  min-height: 36px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  color: #767676;
  background: transparent;
  font-family: var(--martha-ref-sans) !important;
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-reference-chat-tabs button.active,
html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-reference-chat-tabs button[aria-selected="true"] {
  color: #75460F;
  background: linear-gradient(180deg, #FFF7E8 0%, #F4D78E 100%);
  border: 1px solid #D9A84A;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, .78), 0 4px 12px rgba(178, 122, 25, .14);
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-cockpit-welcome {
  position: absolute;
  z-index: 1;
  inset: 126px 0 208px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  width: auto;
  max-width: none;
  min-height: 0;
  margin: 0;
  padding: 38px 20px 0;
  text-align: center;
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-reference-chat-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-reference-chat-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 300px;
  max-width: 70vw;
  color: #A86D1D;
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-reference-chat-logo {
  display: block;
  width: 225px;
  height: 300px;
  background: url('/assets/martha-logo-transparent.png') center / contain no-repeat;
  filter: drop-shadow(0 12px 12px rgba(151, 95, 16, .14));
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-reference-chat-wordmark {
  display: block;
  margin-top: -6px;
  color: #C38321;
  font-family: var(--martha-ref-serif) !important;
  font-size: 60px;
  font-weight: 400;
  letter-spacing: .025em;
  line-height: .86;
  text-shadow: 0 1px 0 #FFEBC0, 0 2px 0 #8F5514, 0 5px 7px rgba(132, 79, 13, .18);
  -webkit-text-stroke: .6px #8F5514;
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-reference-chat-hero h1 {
  margin: 58px 0 0;
  color: #171717 !important;
  font-family: var(--martha-ref-serif) !important;
  font-size: clamp(42px, 6vw, 52px);
  font-weight: 400;
  letter-spacing: -.04em;
  line-height: 1.07;
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-reference-chat-hero h1::first-line {
  color: #A86D1D;
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-feed,
html body#martha-app.martha-design-system.martha-client-chat #view-martha #martha-chat-provider-notice,
html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-disclaimer,
html body#martha-app.martha-design-system.martha-client-chat #view-martha #martha-chat-state {
  display: none !important;
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-composer-wrap {
  position: absolute;
  z-index: 3;
  right: 10px;
  bottom: 34px;
  left: 10px;
  width: auto;
  max-width: none;
  margin: 0;
  padding: 0;
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-composer {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 100%;
  height: 190px;
  min-height: 190px;
  padding: 20px 16px 12px;
  border: 1px solid #E8D5AC !important;
  border-radius: 40px;
  background: rgba(255, 253, 249, .92) !important;
  box-shadow: 0 18px 34px rgba(164, 112, 32, .11), inset 0 1px 1px rgba(255, 255, 255, .9);
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-composer:focus-within {
  border-color: #D1A04E !important;
  box-shadow: 0 18px 34px rgba(164, 112, 32, .11), 0 0 0 4px rgba(232, 184, 79, .12);
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-composer textarea {
  flex: 1 1 auto;
  width: calc(100% - 20px);
  min-height: 44px;
  max-height: 74px;
  margin: 0 0 5px 20px;
  padding: 7px 12px 7px 13px;
  border: 0;
  border-radius: 0;
  color: #171717;
  background: transparent !important;
  font-family: var(--martha-ref-sans) !important;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.4;
  resize: none;
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-composer textarea::placeholder {
  color: #8A8A8A;
  opacity: 1;
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-composer-tools {
  display: flex;
  flex: 0 0 74px;
  align-items: center;
  flex-wrap: nowrap;
  gap: 0;
  width: 100%;
  padding: 0;
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha :is(.martha-chat-composer-left,.martha-client-composer-primary) {
  display: flex;
  align-items: center;
  flex: 1 1 auto;
  min-width: 0;
  gap: 10px;
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-client-composer-secondary {
  display: none !important;
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-client-composer-plus,
html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-composer-right .martha-chat-tool,
html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-send {
  display: grid;
  place-items: center;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  min-width: 42px;
  min-height: 42px;
  padding: 9px;
  border: 1px solid #E8DFCC;
  border-radius: 50%;
  color: #171717;
  background: rgba(255, 253, 249, .82);
  box-shadow: 0 5px 14px rgba(83, 59, 25, .06);
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-client-composer-plus svg,
html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-composer-right .martha-chat-tool svg {
  width: 20px;
  height: 20px;
  stroke-width: 1.5;
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-composer-right {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 10px;
  margin-left: 10px;
  padding-left: 10px;
  border-left: 1px solid #E8DFCC;
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-client-tools {
  position: relative;
  display: block;
  flex: 0 1 auto;
  min-width: 0;
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-reference-composer-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: auto;
  height: 38px;
  min-height: 38px;
  max-width: 100%;
  padding: 0 14px;
  border: 1px solid #E8D5AC;
  border-radius: 999px;
  color: #171717;
  background: rgba(255, 253, 249, .84);
  box-shadow: 0 4px 10px rgba(83, 59, 25, .04);
  font-family: var(--martha-ref-sans) !important;
  font-size: 13px;
  white-space: nowrap;
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-reference-composer-pill:hover,
html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-reference-composer-pill:focus-visible {
  border-color: #C8953B;
  background: #FFFDF9;
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-reference-composer-icon {
  display: none;
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-client-menu[data-menu="model"] .martha-reference-composer-pill::after,
html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-client-menu[data-menu="autonomy"] .martha-reference-composer-pill::after {
  display: none;
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha :is(.martha-chat-send,.martha-chat-stop) {
  flex-basis: 46px;
  width: 46px;
  height: 46px;
  min-width: 46px;
  min-height: 46px;
  padding: 11px;
  color: #FFFDF9;
  background: linear-gradient(145deg, #F0C66A 0%, #D18E24 100%) !important;
  border-color: #D9A84A;
  box-shadow: 0 9px 19px rgba(175, 117, 20, .24), inset 0 1px 1px rgba(255, 240, 188, .76);
  opacity: 1;
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha :is(.martha-chat-send,.martha-chat-stop) svg {
  width: 22px;
  height: 22px;
  stroke-width: 1.55;
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-client-tools-menu {
  z-index: 50;
  bottom: calc(100% + 10px);
  border: 1px solid #E8D5AC;
  border-radius: 20px;
  background: #FFFDF9;
  box-shadow: 0 18px 36px rgba(112, 75, 18, .16);
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-client-tools-menu button:hover,
html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-client-tools-menu button:focus-visible,
html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-client-tools-menu [data-autonomy-value].is-selected {
  color: #75460F;
  background: #F8E6BE;
}

@media (max-width: 640px) {
  html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-client-mobile-header {
    grid-template-columns: 54px minmax(0, 1fr) 72px;
    gap: 10px;
    flex-basis: 88px;
    height: 88px;
    min-height: 88px;
    padding: 21px 18px 0;
  }
  html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-client-mobile-header > .martha-client-mobile-menu {
    width: 38px;
    height: 38px;
    min-width: 38px;
    min-height: 38px;
    padding: 8px;
  }
  html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-client-mobile-actions { width: 72px; }
  html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-client-mobile-actions .martha-client-mobile-new { flex-basis: 38px; width: 38px; height: 38px; min-width: 38px; min-height: 38px; }
  html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-client-mobile-actions .martha-client-mobile-browser { flex-basis: 32px; width: 32px; height: 32px; min-width: 32px; min-height: 32px; }
  html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-client-mobile-header .martha-client-mobile-menu svg,
  html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-client-mobile-actions svg { width: 17px; height: 17px; }
  html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-reference-chat-tabs { height: 38px; padding: 2px; width: min(100%, 190px); }
  html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-reference-chat-tabs button { height: 32px; min-height: 32px; padding: 0 10px; font-size: 13px; }
  html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-cockpit-welcome { inset: 88px 0 176px; padding: 62px 16px 0; }
  html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-reference-chat-brand { width: 220px; }
  html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-reference-chat-logo { width: 170px; height: 203px; object-fit: contain; transform: none; filter: saturate(1.35) brightness(1.18) drop-shadow(0 12px 12px rgba(151, 95, 16, .16)); }
  html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-reference-chat-wordmark { font-size: 42px; transform: scale(1.42); }
  html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-reference-chat-hero h1 { margin-top: 32px; font-size: clamp(33px, 7vw, 43px); }
  html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-composer-wrap { right: 8px; bottom: 16px; left: 8px; }
  html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-composer { height: 157px; min-height: 157px; padding: 14px 9px 8px; border-radius: 30px; }
  html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-composer textarea { min-height: 40px; max-height: 48px; margin-left: 13px; padding: 4px 8px 4px 10px; font-size: 17px; }
  html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-composer-tools { flex-basis: 57px; }
  html body#martha-app.martha-design-system.martha-client-chat #view-martha :is(.martha-chat-composer-left,.martha-client-composer-primary) { gap: 5px; }
  html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-client-composer-plus,
  html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-composer-right .martha-chat-tool { flex-basis: 40px; width: 40px; height: 40px; min-width: 40px; min-height: 40px; padding: 8px; }
  html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-client-composer-plus svg,
  html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-composer-right .martha-chat-tool svg { width: 19px; height: 19px; }
  html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-reference-composer-pill { height: 43px; min-height: 43px; gap: 5px; padding: 0 8px; font-size: 12px; }
  html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-reference-composer-icon { flex-basis: 21px; width: 21px; height: 21px; }
  html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-reference-composer-icon svg { width: 21px; height: 21px; }
  html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-client-menu[data-menu="model"] .martha-reference-composer-pill::after,
  html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-client-menu[data-menu="autonomy"] .martha-reference-composer-pill::after { font-size: 15px; }
  html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-composer-right { gap: 5px; margin-left: 5px; padding-left: 5px; }
  html body#martha-app.martha-design-system.martha-client-chat #view-martha :is(.martha-chat-send,.martha-chat-stop) { flex-basis: 44px; width: 44px; height: 44px; min-width: 44px; min-height: 44px; padding: 10px; }
  html body#martha-app.martha-design-system.martha-client-chat #view-martha :is(.martha-chat-send,.martha-chat-stop) svg { width: 21px; height: 21px; }
  html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-client-menu[data-menu="autonomy"] { flex: 1 1 auto; min-width: 0; }
  html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-client-menu[data-menu="autonomy"] .martha-reference-composer-pill { width: 100%; }
  html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-client-menu [data-menu-label] { max-width: none; overflow: visible; font-size: inherit; white-space: nowrap; }
  html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-client-menu [data-menu-label]::after { content: none !important; }
}

/* VISUEL-03 — la marque est désormais un asset 3D unique, wordmark inclus. */
html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-reference-chat-brand {
  width: 360px;
  max-width: 80vw;
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-cockpit-welcome {
  padding-top: 96px;
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-reference-chat-logo {
  display: block;
  width: 240px;
  height: 286px;
  max-width: none;
  margin: 0;
  border: 0;
  background: transparent !important;
  object-fit: contain;
  transform: none;
  filter: saturate(1.08) brightness(1.02) drop-shadow(0 12px 12px rgba(151, 95, 16, .16));
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-reference-chat-wordmark {
  display: none !important;
}

@media (max-width: 640px) {
  html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-cockpit-welcome {
    padding-top: 62px;
  }
  html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-reference-chat-brand {
    width: 260px;
    max-width: 72vw;
  }
  html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-reference-chat-logo {
    width: 200px;
    height: 238px;
    object-fit: contain;
    transform: none;
  }
}

/* VISUEL-04 — le shell Discussion reste le même écran à toutes les largeurs.
   Le cockpit historique imposait encore la sidebar dans le flux au-dessus de
   1023px, ce qui poussait le nouveau rendu sous la fenêtre. La maquette de
   Discussion est un plein écran ; son menu réel reste un tiroir ouvert par le
   bouton hamburger, quel que soit le viewport. */
html body#martha-app.martha-design-system.martha-client-chat .app-shell,
html body#martha-app.martha-design-system.martha-client-chat .app-shell > .main,
html body#martha-app.martha-design-system.martha-client-chat #view-martha.active-view,
html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-view,
html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-shell,
html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-main {
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  height: 100dvh !important;
  min-height: 100dvh !important;
  margin: 0 !important;
}

html body#martha-app.martha-design-system.martha-client-chat .app-shell > .main {
  overflow: hidden !important;
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-shell {
  position: relative !important;
  display: block !important;
  overflow: hidden !important;
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-main {
  position: absolute !important;
  inset: 0 !important;
  display: flex !important;
  overflow: hidden !important;
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-cockpit-welcome {
  flex-direction: column !important;
  justify-content: flex-start !important;
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-sidebar {
  position: fixed !important;
  z-index: 60 !important;
  inset: 0 auto 0 0 !important;
  width: min(280px, 88vw) !important;
  height: 100dvh !important;
  transform: translateX(-105%) !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
  transition: transform .18s ease, visibility .18s ease, opacity .18s ease !important;
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-mobile-sidebar-open .martha-chat-sidebar {
  transform: translateX(0) !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-rail,
html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-client-drawer-backdrop {
  display: none !important;
}

html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-mobile-sidebar-open .martha-client-drawer-backdrop {
  display: block !important;
  position: fixed !important;
  z-index: 59 !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  background: rgba(100, 75, 34, .2) !important;
}

@media (min-width: 641px) {
  html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-cockpit-welcome {
    padding-top: 80px;
  }
  html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-reference-chat-hero h1 {
    margin-top: 40px;
  }
}

/* Keep the reference composition legible in short desktop viewports too. */
@media (min-width: 641px) and (max-height: 900px) {
  html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-cockpit-welcome {
    padding-top: 28px;
  }
  html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-reference-chat-brand {
    width: 230px;
  }
  html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-reference-chat-logo {
    width: 230px;
    height: 274px;
    object-fit: contain;
  }
  html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-reference-chat-hero h1 {
    margin-top: 28px;
    font-size: clamp(36px, 5.2vw, 46px);
  }
  html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-composer-wrap {
    bottom: 16px;
  }
  html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-chat-composer {
    height: 170px;
    min-height: 170px;
  }
}

@media (max-width: 640px) and (max-height: 760px) {
  html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-cockpit-welcome {
    padding-top: 24px;
  }
  html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-reference-chat-brand {
    width: 180px;
    max-width: 62vw;
  }
  html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-reference-chat-logo {
    width: 180px;
    height: 215px;
    object-fit: contain;
  }
  html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-reference-chat-hero h1 {
    margin-top: 20px;
    font-size: clamp(30px, 6.5vw, 38px);
  }
}

@media (max-width: 640px) and (max-height: 640px) {
  html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-cockpit-welcome {
    padding-top: 12px;
  }
  html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-reference-chat-brand {
    width: 150px;
    max-width: 50vw;
  }
  html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-reference-chat-logo {
    width: 150px;
    height: 179px;
    object-fit: contain;
  }
  html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-reference-chat-hero h1 {
    margin-top: 12px;
    font-size: 32px;
  }
}

/* VISUEL-04 — écran de connexion aligné sur la capture validée. */
html body#martha-app.martha-auth-active {
  --martha-auth-cream: #FAF6EE;
  --martha-auth-card: #FFFDF8;
  --martha-auth-ink: #2A2420;
  --martha-auth-muted: #8A7F6E;
  --martha-auth-gold: #B8863A;
  --martha-auth-light-gold: #F4DA9E;
  --martha-auth-line: #E8DFCC;
  background: var(--martha-auth-cream) !important;
  color: var(--martha-auth-ink) !important;
}

html body#martha-app.martha-auth-active .martha-auth-screen {
  min-height: 100dvh;
  overflow: auto;
  padding: 42px 24px 28px;
  background:
    radial-gradient(circle at 88% 8%, rgba(244, 218, 158, .2), transparent 26%),
    radial-gradient(circle at 4% 90%, rgba(244, 218, 158, .14), transparent 25%),
    var(--martha-auth-cream) !important;
}

html body#martha-app.martha-auth-active .martha-auth-screen::after {
  position: absolute;
  width: 520px;
  height: 520px;
  right: -280px;
  top: -260px;
  border: 1px solid rgba(233, 200, 118, .38);
  border-radius: 50%;
  content: '';
  pointer-events: none;
}

html body#martha-app.martha-auth-active .martha-auth-layout {
  position: relative;
  z-index: 1;
  display: block;
  width: min(492px, calc(100% - 64px));
  min-height: 0;
}

html body#martha-app.martha-auth-active .martha-auth-card {
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  text-align: center;
}

html body#martha-app.martha-auth-active .martha-auth-card-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 164px;
  margin: 0 0 18px;
}

html body#martha-app.martha-auth-active .martha-auth-reference-logo {
  display: block;
  width: 136px;
  height: 162px;
  transform: translateY(33px);
  object-fit: contain;
  filter: saturate(1.06) brightness(1.03) drop-shadow(0 12px 12px rgba(151, 95, 16, .14));
}

html body#martha-app.martha-auth-active .martha-auth-card-heading h2 {
  margin: 0;
  color: var(--martha-auth-ink);
  font-family: var(--martha-ref-serif) !important;
  font-size: clamp(24px, 5vw, 30px);
  font-weight: 400;
  letter-spacing: -.03em;
  line-height: 1.05;
  white-space: nowrap;
}

html body#martha-app.martha-auth-active .martha-auth-card-heading h2 strong {
  color: var(--martha-auth-gold);
  font-weight: 500;
}

html body#martha-app.martha-auth-active .martha-auth-card-heading h2 span {
  color: var(--martha-auth-ink);
  font-weight: 400;
}

html body#martha-app.martha-auth-active .martha-auth-card-heading > p {
  margin: 6px 0 32px;
  color: var(--martha-auth-muted);
  font-family: var(--martha-ref-sans) !important;
  font-size: 14.5px;
  line-height: 1.4;
}

html body#martha-app.martha-auth-active .martha-auth-email-field {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  align-items: center;
  width: 100%;
  height: 70px;
  margin: 0;
  padding: 0 20px;
  border: 1px solid var(--martha-auth-line);
  border-radius: 999px;
  color: var(--martha-auth-gold);
  background: rgba(255, 253, 248, .84);
  box-shadow: 0 5px 18px rgba(139, 100, 34, .04);
  text-align: left;
}

html body#martha-app.martha-auth-active .martha-auth-email-field:focus-within {
  border-color: var(--martha-auth-gold);
  box-shadow: 0 0 0 4px rgba(233, 200, 118, .16);
}

html body#martha-app.martha-auth-active .martha-auth-email-field svg {
  width: 25px;
  height: 25px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
}

html body#martha-app.martha-auth-active .martha-auth-email-field input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--martha-auth-ink);
  background: transparent;
  font: inherit;
  font-size: 18px;
}

html body#martha-app.martha-auth-active .martha-auth-email-field input::placeholder {
  color: var(--martha-auth-muted);
  opacity: .82;
}

html body#martha-app.martha-auth-active .martha-auth-primary {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  height: 70px;
  margin: 19px 0 28px;
  padding: 0 24px;
  border: 1px solid #D9A84A;
  border-radius: 999px;
  color: var(--martha-auth-ink);
  background: linear-gradient(180deg, #FFF1C9 0%, #E9B64F 100%);
  box-shadow: 0 8px 20px rgba(175, 117, 20, .2), inset 0 1px 1px rgba(255, 255, 255, .86);
  font: 500 19px var(--martha-ref-sans);
}

html body#martha-app.martha-auth-active .martha-auth-primary span:last-child {
  position: absolute;
  right: 24px;
  margin-left: 0;
  color: #75460F;
  font-size: 27px;
  line-height: 1;
}

html body#martha-app.martha-auth-active .martha-auth-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  margin: 0 0 25px;
  color: var(--martha-auth-muted);
  font: 400 16px var(--martha-ref-sans);
  text-transform: none;
}

html body#martha-app.martha-auth-active .martha-auth-divider::before,
html body#martha-app.martha-auth-active .martha-auth-divider::after {
  height: 1px;
  flex: 1;
  background: var(--martha-auth-line);
}

html body#martha-app.martha-auth-active .martha-auth-providers {
  display: grid;
  gap: 14px;
  width: 100%;
  margin: 0;
}

html body#martha-app.martha-auth-active .martha-auth-provider {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 24px;
  align-items: center;
  width: 100%;
  min-height: 64px;
  padding: 0 18px;
  border: 1px solid var(--martha-auth-line);
  border-radius: 999px;
  color: var(--martha-auth-ink);
  background: rgba(255, 253, 248, .64);
  box-shadow: none;
  opacity: 1;
  text-align: center;
}

html body#martha-app.martha-auth-active .martha-auth-provider:disabled {
  opacity: .64;
  cursor: not-allowed;
  color: var(--martha-auth-ink) !important;
  background: rgba(255, 253, 248, .64) !important;
  -webkit-text-fill-color: var(--martha-auth-ink) !important;
  filter: grayscale(.18) !important;
}

html body#martha-app.martha-auth-active .martha-auth-provider-icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 0;
  background: transparent;
}

html body#martha-app.martha-auth-active .martha-auth-provider-icon svg {
  width: 24px;
  height: 24px;
}

html body#martha-app.martha-auth-active .martha-auth-apple {
  color: var(--martha-auth-ink) !important;
}

html body#martha-app.martha-auth-active .martha-auth-provider > span:nth-child(2) {
  justify-self: stretch;
  text-align: left;
}

html body#martha-app.martha-auth-active .martha-auth-provider b {
  font: 400 17px var(--martha-ref-sans);
}

html body#martha-app.martha-auth-active .martha-auth-provider-arrow {
  display: none;
}

html body#martha-app.martha-auth-active .martha-auth-provider small {
  display: block;
  margin-top: 4px;
  color: var(--martha-auth-muted);
  font: 400 11px/1.35 var(--martha-ref-sans);
}

html body#martha-app.martha-auth-active .martha-auth-passkey {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin: 30px auto 0;
  padding: 0;
  border: 0;
  color: var(--martha-auth-gold);
  background: transparent;
  font: 500 16px var(--martha-ref-sans);
}

html body#martha-app.martha-auth-active .martha-auth-passkey svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
}

html body#martha-app.martha-auth-active .martha-auth-account {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  margin: 41px 0 0;
  color: var(--martha-auth-ink);
  font: 400 16px var(--martha-ref-sans);
}

html body#martha-app.martha-auth-active .martha-auth-account button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0;
  border: 0;
  color: var(--martha-auth-gold);
  background: transparent;
  font: 500 16px var(--martha-ref-sans);
}

html body#martha-app.martha-auth-active .martha-auth-account button span {
  font-size: 23px;
  line-height: 1;
}

html body#martha-app.martha-auth-active .martha-auth-legal {
  margin: 52px auto 0;
  color: var(--martha-auth-muted);
  font: 400 12px/1.55 var(--martha-ref-sans);
}

html body#martha-app.martha-auth-active .martha-auth-legal span {
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* The provider readiness state must never turn a reference outline pill dark. */
html body#martha-app.martha-auth-active button.martha-auth-provider[data-auth-provider="google"] {
  appearance: none;
  color: var(--martha-auth-ink) !important;
  background: #FFFDF8 !important;
  background-image: none !important;
  -webkit-text-fill-color: var(--martha-auth-ink) !important;
}

@media (max-width: 640px) {
  html body#martha-app.martha-auth-active .martha-auth-screen {
    padding: 24px 16px 22px;
  }
  html body#martha-app.martha-auth-active .martha-auth-card-brand {
    height: 150px;
    margin-bottom: 14px;
  }
  html body#martha-app.martha-auth-active .martha-auth-reference-logo {
    width: 140px;
    height: 167px;
    transform: none;
  }
  html body#martha-app.martha-auth-active .martha-auth-card-heading h2 {
    font-size: clamp(28px, 7.4vw, 39px);
  }
  html body#martha-app.martha-auth-active .martha-auth-card-heading > p {
    margin-top: 12px;
    margin-bottom: 22px;
    font-size: 16px;
  }
  html body#martha-app.martha-auth-active .martha-auth-email-field,
  html body#martha-app.martha-auth-active .martha-auth-primary {
    height: 58px;
  }
  html body#martha-app.martha-auth-active .martha-auth-provider { min-height: 58px; }
  html body#martha-app.martha-auth-active .martha-auth-provider b,
  html body#martha-app.martha-auth-active .martha-auth-account,
  html body#martha-app.martha-auth-active .martha-auth-account button,
  html body#martha-app.martha-auth-active .martha-auth-passkey { font-size: 15px; }
  html body#martha-app.martha-auth-active .martha-auth-legal { margin-top: 42px; font-size: 11px; }
}

/* VISUEL-05 — le canevas racine doit rester crème à toute résolution.
   Le shell couvre déjà le viewport, mais html était encore noir : toute
   zone transparente ou dépassant le flux révélait donc l'ancien fond dark. */
html:has(body#martha-app.martha-client-chat) {
  min-height: 100%;
  background: #FBFAF7 !important;
  color-scheme: light;
}

html body#martha-app.martha-client-chat {
  min-width: 100%;
  min-height: 100dvh;
  background: #FBFAF7 !important;
}

html body#martha-app.martha-client-chat:not(.martha-auth-active),
html body#martha-app.martha-client-chat:not(.martha-auth-active) .app-shell,
html body#martha-app.martha-client-chat:not(.martha-auth-active) .app-shell > .main,
html body#martha-app.martha-client-chat:not(.martha-auth-active) #view-martha.active-view,
html body#martha-app.martha-client-chat:not(.martha-auth-active) #view-martha .martha-chat-view,
html body#martha-app.martha-client-chat:not(.martha-auth-active) #view-martha .martha-chat-shell,
html body#martha-app.martha-client-chat:not(.martha-auth-active) #view-martha .martha-chat-main {
  background-color: #FBFAF7 !important;
}

html body#martha-app.martha-client-chat:not(.martha-auth-active) .app-shell,
html body#martha-app.martha-client-chat:not(.martha-auth-active) .app-shell > .main,
html body#martha-app.martha-client-chat:not(.martha-auth-active) #view-martha.active-view,
html body#martha-app.martha-client-chat:not(.martha-auth-active) #view-martha .martha-chat-view,
html body#martha-app.martha-client-chat:not(.martha-auth-active) #view-martha .martha-chat-shell,
html body#martha-app.martha-client-chat:not(.martha-auth-active) #view-martha .martha-chat-main {
  min-height: 100dvh !important;
}

html:has(body#martha-app.martha-auth-active) {
  min-height: 100%;
  background: #FAF6EE !important;
  color-scheme: light;
}

html body#martha-app.martha-auth-active {
  min-width: 100%;
  min-height: 100dvh;
  background: #FAF6EE !important;
}

html body#martha-app.martha-design-system.martha-client-chat.martha-auth-active {
  background-color: #FAF6EE !important;
  background-image: none !important;
  height: 100dvh !important;
  overflow: hidden !important;
}

html body#martha-app.martha-auth-active .martha-auth-screen {
  width: 100%;
  min-width: 100%;
  height: 100dvh !important;
  min-height: 100dvh !important;
  box-sizing: border-box;
  overflow: auto !important;
  overflow-x: hidden !important;
  background-color: #FAF6EE !important;
}

/* Connexion — boutons Apple/Google dorés et message d'état sans pastille. */
html body#martha-app.martha-auth-active button.martha-auth-provider {
  position: relative;
  border: 1px solid rgba(168, 109, 29, .38);
  background: linear-gradient(180deg, #FFFEFB 0%, #FBF3E1 100%) !important;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .9) inset, 0 6px 18px rgba(168, 109, 29, .10);
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

html body#martha-app.martha-auth-active button.martha-auth-provider:not(:disabled):hover,
html body#martha-app.martha-auth-active button.martha-auth-provider:not(:disabled):focus-visible {
  border-color: #E8B84F;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .9) inset, 0 10px 26px rgba(168, 109, 29, .20);
  transform: translateY(-1px);
}

html body#martha-app.martha-auth-active button.martha-auth-provider:focus-visible {
  outline: 2px solid #A86D1D;
  outline-offset: 3px;
}

html body#martha-app.martha-auth-active button.martha-auth-provider:disabled {
  opacity: .92;
  filter: none !important;
  background: linear-gradient(180deg, #FFFEFB 0%, #F8F1E3 100%) !important;
  border-color: rgba(168, 109, 29, .42);
  box-shadow: none;
}

html body#martha-app.martha-auth-active button.martha-auth-provider .martha-auth-provider-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #FFFFFF;
  box-shadow: 0 0 0 1px rgba(168, 109, 29, .22), 0 2px 6px rgba(168, 109, 29, .14);
}

html body#martha-app.martha-auth-active button.martha-auth-provider .martha-auth-provider-icon svg {
  width: 20px;
  height: 20px;
}

html body#martha-app.martha-auth-active .martha-auth-google svg path:nth-of-type(1) { fill: #4285F4; }
html body#martha-app.martha-auth-active .martha-auth-google svg path:nth-of-type(2) { fill: #34A853; }
html body#martha-app.martha-auth-active .martha-auth-google svg path:nth-of-type(3) { fill: #FBBC05; }

html body#martha-app.martha-auth-active .martha-auth-status {
  border: 1px solid rgba(168, 109, 29, .28);
  border-radius: 14px;
  padding: 10px 14px;
  background: #FBF3E1;
  color: #5E3F12;
}

html body#martha-app.martha-auth-active .martha-auth-status[data-state="error"] {
  border-color: rgba(168, 90, 76, .4);
  background: #FBEFEA;
  color: #7A3B30;
}

html body#martha-app.martha-auth-active .martha-auth-status .martha-auth-status-dot {
  display: none;
}

/* Menu « + » du chat : même apparence que le menu du mode d'autonomie, placé au-dessus du bouton. */
html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-plus-menu {
  position: fixed;
  z-index: 70;
  width: 224px;
  min-width: 224px;
}
html body#martha-app.martha-design-system.martha-client-chat #view-martha .martha-plus-menu[hidden] { display: none; }

/* Fenêtre « Document déjà dans Martha » : même thème clair que le reste de l'application, texte lisible. */
html body#martha-app.martha-design-system .martha-attachment-dialog {
  color: #2A2420;
  border: 1px solid #E8DFCC;
  background: #FFFDF9;
  box-shadow: 0 24px 70px rgba(42, 36, 32, .24);
}
html body#martha-app.martha-design-system .martha-attachment-dialog::backdrop { background: rgba(42, 36, 32, .42); backdrop-filter: none; }
html body#martha-app.martha-design-system .martha-attachment-dialog form { gap: 14px; }
html body#martha-app.martha-design-system .martha-attachment-dialog .martha-cockpit-eyebrow { color: #8A7F6E; font-size: 12px; }
html body#martha-app.martha-design-system .martha-attachment-dialog .martha-dialog-heading h2 { color: #2A2420; font-size: 22px; }
html body#martha-app.martha-design-system .martha-attachment-dialog .martha-dialog-heading p:last-child { color: #5F5547; font-size: 15px; line-height: 1.5; }
html body#martha-app.martha-design-system .martha-attachment-dialog .martha-dialog-close { color: #5F5547; border-color: #E8DFCC; background: #FAF6EE; }
html body#martha-app.martha-design-system .martha-attachment-dialog label { color: #5F5547; font-size: 14px; }
html body#martha-app.martha-design-system .martha-attachment-dialog select,
html body#martha-app.martha-design-system .martha-attachment-dialog input {
  min-height: 44px;
  color: #2A2420;
  border-color: #D9CDB4;
  background: #FFFFFF;
  font-size: 16px;
}
html body#martha-app.martha-design-system .martha-attachment-dialog .martha-dialog-hint { color: #6B6154; font-size: 14px; line-height: 1.5; }
html body#martha-app.martha-design-system .martha-attachment-dialog .martha-dialog-secondary,
html body#martha-app.martha-design-system .martha-attachment-dialog .martha-dialog-primary { min-height: 44px; font-size: 15px; }
html body#martha-app.martha-design-system .martha-attachment-dialog .martha-dialog-secondary { color: #2A2420; border-color: #D9CDB4; background: #FFFFFF; }
html body#martha-app.martha-design-system .martha-attachment-dialog .martha-dialog-primary { color: #FFFFFF; border-color: #2A2420; background: #2A2420; }

html body#martha-app.martha-design-system .martha-attachment-dialog label::after { content: none; }

/* Pastilles des fichiers ajoutés avec le « + », au-dessus du champ de saisie. */
html body#martha-app.martha-design-system .martha-chat-pending { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px 14px 0; }
html body#martha-app.martha-design-system .martha-chat-pending[hidden] { display: none; }
html body#martha-app.martha-design-system .martha-chat-pending-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  min-height: 32px;
  border: 1px solid #E8DFCC;
  border-radius: 10px;
  padding: 0 10px;
  color: #2A2420;
  background: #FAF6EE;
  font-size: 14px;
}
html body#martha-app.martha-design-system .martha-chat-pending-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
html body#martha-app.martha-design-system .martha-chat-pending-state { flex: none; color: #6B6154; font-size: 13px; }
html body#martha-app.martha-design-system .martha-chat-pending-chip[data-state="ready"] .martha-chat-pending-state { color: #3E6B3E; }

/* Liste des discussions : pas de rond devant le titre ; « Voir tout » ne passe jamais sous le titre. */
html body#martha-app.martha-design-system .martha-chat-sidebar .martha-chat-conversation-dot { display: none; }
html body#martha-app.martha-design-system .martha-client-recent .martha-client-sidebar-heading { padding-right: 92px; }
html body#martha-app.martha-design-system .martha-client-recent .martha-client-sidebar-heading h2 { margin: 0; overflow-wrap: anywhere; }

/* Photos et fichiers : aperçu dans le champ de saisie, puis au-dessus du texte du message. */
html body#martha-app.martha-design-system .martha-chat-pending-chip { position: relative; }
html body#martha-app.martha-design-system .martha-chat-pending-photo { padding: 0; min-height: 0; border-radius: 12px; overflow: visible; }
html body#martha-app.martha-design-system .martha-chat-pending-photo img { display: block; width: 64px; height: 64px; border-radius: 12px; object-fit: cover; }
html body#martha-app.martha-design-system .martha-chat-pending-photo .martha-chat-pending-state { position: absolute; left: 0; right: 0; bottom: 0; padding: 2px 0; border-radius: 0 0 12px 12px; color: #FFFFFF; background: rgba(42, 36, 32, .62); font-size: 12px; text-align: center; }
html body#martha-app.martha-design-system .martha-chat-pending-remove { display: grid; place-items: center; flex: none; width: 28px; height: 28px; margin-right: -6px; border: 0; border-radius: 50%; color: #5F5547; background: transparent; font-size: 20px; line-height: 1; cursor: pointer; }
html body#martha-app.martha-design-system .martha-chat-pending-photo .martha-chat-pending-remove { position: absolute; top: -8px; right: -8px; margin: 0; border: 1px solid #E8DFCC; color: #2A2420; background: #FFFDF9; }
html body#martha-app.martha-design-system .martha-chat-attachments { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 6px; }
html body#martha-app.martha-design-system .martha-chat-message.user .martha-chat-attachments { justify-content: flex-end; }
html body#martha-app.martha-design-system .martha-chat-attachment-image { display: block; max-width: min(240px, 70vw); max-height: 240px; border-radius: 14px; object-fit: cover; }
html body#martha-app.martha-design-system .martha-chat-attachment-file { display: inline-flex; align-items: center; min-height: 32px; border: 1px solid #E8DFCC; border-radius: 10px; padding: 0 10px; color: #2A2420; background: #FAF6EE; font-size: 14px; }

/* Dictée : l'état « enregistrement » change la couleur, jamais la taille du bouton. */
html body#martha-app.martha-design-system [data-chat-tool="voice"].is-recording { color: #FFFFFF; background: #C0392B; border-color: #C0392B; }
html body#martha-app.martha-design-system [data-chat-tool="voice"].is-transcribing { opacity: .6; }

/* Photo en grand, flèche « aller en bas », bouton « Copier » des blocs de code. */
html body#martha-app.martha-design-system .martha-chat-attachment-image { cursor: zoom-in; }
html body dialog.martha-image-viewer { box-sizing: border-box; position: fixed; border-radius: 0; box-shadow: none; outline: 0; inset: 0; width: 100vw; max-width: none; height: 100dvh; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(20, 16, 12, .94); }
html body dialog.martha-image-viewer[open] { display: grid; place-items: center; }
.martha-image-viewer::backdrop { background: rgba(20, 16, 12, .94); }
html body dialog.martha-image-viewer img { max-width: 100vw; max-height: calc(100dvh - 72px); object-fit: contain; touch-action: pan-x pan-y pinch-zoom; }
html body dialog.martha-image-viewer[open] { overflow: auto; -webkit-overflow-scrolling: touch; }
html body dialog.martha-image-viewer .martha-image-viewer-close { position: fixed; top: max(12px, env(safe-area-inset-top)); right: 12px; display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 50%; color: #FFFFFF; background: rgba(255, 255, 255, .18); font-size: 28px; line-height: 1; cursor: pointer; }
html body dialog.martha-image-viewer .martha-image-viewer-save { color: #FFFFFF !important; position: fixed; bottom: max(14px, env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); padding: 10px 18px; border-radius: 999px; color: #FFFFFF; background: rgba(255, 255, 255, .18); font-size: 15px; text-decoration: none; }
html body#martha-app.martha-design-system #view-martha .martha-chat-generated-image { width: min(680px, 100%); max-width: 100%; max-height: min(72vh, 760px); border-radius: 14px; background: #F5F0E6; object-fit: contain; cursor: zoom-in; }
html body#martha-app.martha-design-system #view-martha .martha-chat-attachment-deleted { display: inline-flex; padding: 8px 10px; border: 1px solid var(--martha-ref-border); border-radius: 10px; color: var(--martha-ref-muted-foreground); font-size: 12px; }
html body dialog.martha-image-viewer .martha-image-viewer-stage { box-sizing: border-box; display: grid; grid-template-rows: minmax(0, 1fr) auto; justify-items: center; gap: 8px; width: min(100vw, 1100px); height: 100dvh; padding: max(68px, calc(env(safe-area-inset-top) + 58px)) 18px max(74px, calc(env(safe-area-inset-bottom) + 66px)); }
html body dialog.martha-image-viewer .martha-image-viewer-stage img { grid-row: 1; width: 100%; height: 100%; max-width: 100%; max-height: 100%; object-fit: contain; }
html body dialog.martha-image-viewer .martha-image-viewer-caption { grid-row: 2; max-width: min(760px, 100%); max-height: 3.4em; margin: 0; overflow: hidden; color: #FFFFFF; font-size: 13px; line-height: 1.45; text-align: center; text-overflow: ellipsis; }
html body dialog.martha-image-viewer .martha-image-viewer-toolbar { position: fixed; bottom: max(14px, env(safe-area-inset-bottom)); left: 50%; display: flex; align-items: center; justify-content: center; gap: 6px; width: max-content; max-width: calc(100vw - 20px); transform: translateX(-50%); }
html body dialog.martha-image-viewer .martha-image-viewer-toolbar .martha-image-viewer-action { box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; flex: 0 1 auto; height: 26px; min-height: 26px; max-width: 100%; padding: 0 9px; border: 1px solid rgba(255,255,255,.28); border-radius: 999px; color: #FFFFFF !important; background: rgba(255,255,255,.16); font: inherit; font-size: 12px; line-height: 1; text-decoration: none; white-space: nowrap; cursor: pointer; }
html body dialog.martha-image-viewer .martha-image-viewer-toolbar .martha-image-viewer-save { position: static !important; inset: auto !important; transform: none !important; padding: 0 9px !important; }
html body dialog.martha-image-viewer .martha-image-viewer-toolbar .martha-image-viewer-action:hover,
html body dialog.martha-image-viewer .martha-image-viewer-toolbar .martha-image-viewer-action:focus-visible { background: rgba(255,255,255,.28); }
html body dialog.martha-image-viewer .martha-image-viewer-status { position: fixed; bottom: max(48px, calc(env(safe-area-inset-bottom) + 46px)); left: 50%; width: min(94vw, 560px); transform: translateX(-50%); color: #FFFFFF; font-size: 12px; text-align: center; }
html body#martha-app.martha-design-system #view-martha .martha-image-generation-progress { max-width: 720px; }
html body#martha-app.martha-design-system #view-martha .martha-image-generation-card { display: grid; gap: 12px; width: min(640px, 100%); margin-top: 10px; padding: 14px; border: 1px solid var(--martha-ref-border); border-radius: 16px; background: linear-gradient(145deg, #FFFDF9, #F5F0E6); }
html body#martha-app.martha-design-system #view-martha .martha-image-generation-card-heading { display: flex; align-items: center; gap: 8px; color: var(--martha-ref-foreground); font-size: 13px; }
html body#martha-app.martha-design-system #view-martha .martha-image-generation-spinner { width: 14px; height: 14px; border: 2px solid #E8DFCC; border-top-color: #B78A35; border-radius: 50%; animation: martha-image-spin .9s linear infinite; }
html body#martha-app.martha-design-system #view-martha .martha-image-generation-placeholder { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; aspect-ratio: 16 / 8; overflow: hidden; border-radius: 11px; background: #EFE8D8; }
html body#martha-app.martha-design-system #view-martha .martha-image-generation-placeholder i { background: linear-gradient(105deg, rgba(255,253,249,.2) 25%, rgba(255,253,249,.78) 45%, rgba(255,253,249,.2) 65%); background-size: 220% 100%; animation: martha-image-shimmer 1.6s ease-in-out infinite; }
html body#martha-app.martha-design-system #view-martha .martha-image-generation-placeholder i:nth-child(2) { animation-delay: .16s; }
html body#martha-app.martha-design-system #view-martha .martha-image-generation-placeholder i:nth-child(3) { animation-delay: .32s; }
html body#martha-app.martha-design-system #view-martha .martha-image-generation-card p { margin: 0; color: var(--martha-ref-muted-foreground); font-size: 12px; }
html body#martha-app.martha-design-system #view-martha .martha-image-generation-consent { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; min-width: 0; }
@keyframes martha-image-spin { to { transform: rotate(360deg); } }
@keyframes martha-image-shimmer { to { background-position: -220% 0; } }
.martha-chat-scroll-bottom { position: fixed; left: 50%; z-index: 40; display: grid; place-items: center; width: 40px; height: 40px; margin-left: -20px; border: 1px solid #E8DFCC; border-radius: 50%; color: #2A2420; background: #FFFDF9; box-shadow: 0 6px 18px rgba(42, 36, 32, .18); font-size: 20px; cursor: pointer; }
.martha-chat-scroll-bottom[hidden] { display: none; }
html body#martha-app.martha-design-system .martha-chat-code { position: relative; }
html body#martha-app.martha-design-system .martha-chat-code-copy { position: absolute; top: 6px; right: 6px; min-height: 28px; padding: 0 10px; border: 1px solid #E8DFCC; border-radius: 8px; color: #2A2420; background: #FFFDF9; font-size: 13px; cursor: pointer; }
html body#martha-app.martha-design-system #view-martha .martha-chat-message-bubble { -webkit-user-select: text; user-select: text; overflow-wrap: anywhere; }
html body#martha-app.martha-design-system #view-martha .martha-chat-table-wrap { box-sizing: border-box; width: 100%; max-width: 100%; margin: 10px 0 12px; overflow-x: auto; overscroll-behavior-inline: contain; border: 1px solid #E8DFCC; border-radius: 10px; background: #FFFDF9; scrollbar-width: thin; }
html body#martha-app.martha-design-system #view-martha .martha-chat-table { width: max-content; min-width: 100%; margin: 0; border-collapse: collapse; font-size: 13px; }
html body#martha-app.martha-design-system #view-martha .martha-chat-table th,
html body#martha-app.martha-design-system #view-martha .martha-chat-table td { max-width: 24rem; padding: 8px 10px; border-bottom: 1px solid #E8DFCC; overflow-wrap: anywhere; white-space: normal; }
html body#martha-app.martha-design-system #view-martha .martha-chat-code { max-width: 100%; padding: 34px 0 0; overflow: hidden; border: 1px solid #E8DFCC; border-radius: 12px; background: #F5F0E6; }
html body#martha-app.martha-design-system #view-martha .martha-chat-code-language { position: absolute; top: 9px; left: 12px; color: #655B4E; font-size: 11px; font-weight: 650; }
html body#martha-app.martha-design-system #view-martha .martha-chat-code pre { max-width: 100%; margin: 0; padding: 12px 14px; overflow: auto; overscroll-behavior-inline: contain; }
html body#martha-app.martha-design-system #view-martha .martha-chat-response-controls { display: inline-flex; align-items: center; gap: 2px; }
html body#martha-app.martha-design-system #view-martha .martha-chat-variant-count { padding: 0 5px; color: var(--martha-ref-muted-foreground); font-size: 11px; white-space: nowrap; }
html body#martha-app.martha-design-system #view-martha .martha-chat-citations { display: grid; gap: 6px; margin-top: 10px; }
html body#martha-app.martha-design-system #view-martha .martha-chat-citation-group { display: flex; flex-wrap: wrap; align-items: center; gap: 5px 8px; }
html body#martha-app.martha-design-system #view-martha .martha-chat-citation-heading { flex-basis: 100%; color: #655B4E; font-size: 11px; font-weight: 650; }
html body#martha-app.martha-design-system #view-martha .martha-chat-citation { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 3px 6px; max-width: 100%; padding: 5px 8px; border: 1px solid #E8DFCC; border-radius: 8px; color: #453D33; background: #FFFDF9; font-size: 11px; overflow-wrap: anywhere; }
html body#martha-app.martha-design-system #view-martha .martha-chat-citation-type { color: #75664F; font-size: 10px; font-weight: 650; }
html body#martha-app.martha-design-system #view-martha .martha-chat-citation-related { border-style: dashed; background: #FAF6EE; }
html body#martha-app.martha-design-system #view-martha .martha-chat-citation a { text-decoration: underline; text-underline-offset: 2px; }
@media (max-width: 480px) {
  html body#martha-app.martha-design-system #view-martha .martha-chat-feed { min-width: 0; }
  html body#martha-app.martha-design-system #view-martha .martha-chat-table { font-size: 12px; }
  html body#martha-app.martha-design-system #view-martha .martha-chat-table th,
  html body#martha-app.martha-design-system #view-martha .martha-chat-table td { max-width: 12rem; padding: 7px 8px; }
  html body#martha-app.martha-design-system #view-martha .martha-chat-message-actions { flex-wrap: wrap; }
}
html body dialog.martha-image-viewer .martha-image-viewer-close:focus-visible { outline: 2px solid #FFFFFF; outline-offset: 2px; }
