/* Avenia brand fonts (from pole-avenia.com theme-avenia)
   Only Regular / Medium / SemiBold ship. Map 600–900 → SemiBold so
   font-weight:700|800 does not synthesize a blurry fake bold. */
@font-face {
  font-family: "TASA Orbiter Display";
  src: url("/brand/fonts/TASAOrbiterDisplay-Regular.woff") format("woff");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "TASA Orbiter Text";
  src: url("/brand/fonts/TASAOrbiterText-Regular.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "TASA Orbiter Text";
  src: url("/brand/fonts/TASAOrbiterText-Medium.woff") format("woff");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "TASA Orbiter Text";
  src: url("/brand/fonts/TASAOrbiterText-SemiBold.woff") format("woff");
  font-weight: 600 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "TASA Orbiter Text SemiBold";
  src: url("/brand/fonts/TASAOrbiterText-SemiBold.woff") format("woff");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}

:root {
  /* ——— Avenia brand tokens (contrast-tuned for dense app UI) ——— */
  /* Source: pole-avenia.com — near-white canvas so content separates without muddy mid-gray float */
  --bg: #f6f7f4;                 /* near-white brand grey — quiet stage, not mid wash */
  --surface: #ffffff;
  --text: #141816;               /* near-black green ink */
  --muted: #2f3631;              /* secondary ink — darker for small UI text */
  --line: #d0d4cb;               /* soft edge vs white — cleaner than mid-olive */
  --primary: #004d43;            /* deeper teal than logo for light-surface ink */
  --primary-strong: #003830;
  --primary-soft: #c5e4db;       /* deepened mint (site soft was too pale on white) */
  --primary-hover: #003830;
  --primary-ghost: rgba(0, 77, 67, 0.1);
  --brand-lime: #b6e24a;         /* richer lightgreen (site #c1f769 was washed on UI) */
  --brand-lime-hover: #a6d43a;
  --brand-lime-ink: #12211b;     /* text on lime */
  --brand-teal: #0e9a8a;         /* mid teal, less neon-pale */
  --brand-cyan: #2ec4c8;
  --brand-yellow: #e6d200;
  /* Soft slate elevation — depth without muddy gray float */
  --shadow: 0 1px 2px rgba(18, 33, 27, 0.05), 0 12px 32px -12px rgba(18, 33, 27, 0.14);
  --shadow-sm: 0 1px 2px rgba(18, 33, 27, 0.04), 0 3px 10px -3px rgba(18, 33, 27, 0.08);
  --shadow-md: 0 2px 4px rgba(18, 33, 27, 0.05), 0 14px 36px -12px rgba(18, 33, 27, 0.16);
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --radius-pill: 3.75rem;
  --control-h: 2.5rem;
  --error: #9f1c14;
  --error-soft: rgba(159, 28, 20, 0.12);
  --warn: #9a4508;
  --warn-soft: rgba(154, 69, 8, 0.14);
  --success: #046c4e;
  --success-soft: rgba(4, 108, 78, 0.14);
  --ink-900: #0c1612;
  --ink-800: #24302c;            /* darkgreen chrome */
  --focus-ring: 0 0 0 3px rgba(0, 77, 67, 0.28);
  --transition: 160ms cubic-bezier(0.4, 0, 0.2, 1);
  --font: "TASA Orbiter Text", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "TASA Orbiter Display", "TASA Orbiter Text", ui-sans-serif, system-ui, sans-serif;
  --font-semibold: "TASA Orbiter Text SemiBold", "TASA Orbiter Text", ui-sans-serif, system-ui, sans-serif;
  --measure-prose: 65ch;

  /* Compatibility aliases used by BO / older primitives */
  --accent: var(--primary);
  --accent-hover: var(--primary-hover);
  --accent-soft: var(--primary-soft);
  --border: var(--line);
  --border-strong: #a8aea2;
  --bg-subtle: #eef0eb;          /* nested chrome only — not the page ground */
  --surface-2: #f4f6f1;
  --score-track: #c5c9c0;
  --score-fill-from: var(--primary);
  --score-fill-to: var(--brand-teal);
}


* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-feature-settings: "cv11", "ss01";
  /* TASA Orbiter reads tight — open tracking slightly vs Inter-era defaults */
  letter-spacing: 0.01em;
  line-height: 1.55;
  font-size: 15px;
  background:
    radial-gradient(1100px 620px at 88% -12%, rgba(182, 226, 74, 0.08), transparent 62%),
    radial-gradient(880px 640px at -14% 108%, rgba(0, 77, 67, 0.04), transparent 58%),
    var(--bg);
  color: var(--text);
  /* Prefer grayscale AA on light UI; synthetic bold looked fuzzier with subpixel */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

::selection {
  background: rgba(193, 247, 105, 0.45);
  color: var(--text);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

/*
 * Prevent accidental text selection flash on interactive chrome
 * during click / drag / double-click. Inputs & textareas stay selectable.
 */
button,
[type="button"],
[type="submit"],
[type="reset"],
[role="button"],
[role="tab"],
[role="menuitem"],
.btn,
.chip,
.tab,
.rail-pill,
.agent-btn,
.dash-text-btn,
.dash-metric,
.dash-row,
.topbar-link,
.rail-link,
.corpus-interest-link,
.notif-bell,
.notif-mark-all,
summary {
  -webkit-user-select: none;
  -moz-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

a {
  color: var(--primary);
}

/*
 * Author `display:` rules (.app-shell, .rail-nav .tab, …) beat the UA stylesheet
 * for [hidden], so without this the attribute does nothing and “hidden” shells/tabs
 * stay visible and clickable — breaking portal↔admin switches and role chrome.
 */
.hidden,
[hidden] {
  display: none !important;
}

/* —— Top bar (mockup) —— */
.topbar {
  height: 72px;
  padding: 0 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -0.03em;
  color: var(--primary);
  font-size: 22px;
}

.brand-symbol {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: var(--primary-soft);
  display: grid;
  place-items: center;
}

.topbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-left: auto;
}

.topbar-user-label {
  font-size: 0.88rem;
  font-weight: 650;
  white-space: nowrap;
  max-width: 14rem;
  overflow: hidden;
  text-overflow: ellipsis;
}

.universe {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-size: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 14px 8px 16px;
  cursor: pointer;
}

.universe-prefix {
  color: var(--muted);
  font-weight: 600;
}

.universe select {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--text);
  font-weight: 600;
  padding-right: 4px;
  outline: none;
  cursor: pointer;
  max-width: 160px;
}

.universe .chevron {
  color: var(--muted);
  pointer-events: none;
}

/* Mobile nav burger — visible only in app shell at ≤900px */
.nav-burger {
  display: none;
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  margin: 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  place-items: center;
  transition: background var(--transition), border-color var(--transition), color var(--transition);
}

.nav-burger:hover {
  background: var(--primary-soft);
  border-color: rgba(0, 77, 67, 0.28);
  color: var(--primary);
}

.nav-burger:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.nav-burger-icon {
  display: grid;
  place-items: center;
}

.nav-burger-icon svg {
  width: 1.25rem;
  height: 1.25rem;
}

.nav-backdrop {
  display: none;
}

.topbar-link {
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 16px;
}

.topbar-link:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* Logout: label on desktop; icon-only on mobile shell (see ≤900px) */
.topbar-logout {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  cursor: pointer;
  font: inherit;
}

.topbar-logout-icon {
  display: none;
  width: 1.15rem;
  height: 1.15rem;
  flex-shrink: 0;
}

/* —— Impersonation (admin viewing as company) —— */
.impersonation-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  padding: 10px 20px;
  background: linear-gradient(90deg, #7a2e0e, #b54708);
  color: #fff7ed;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  box-shadow: 0 4px 20px rgba(181, 71, 8, 0.25);
}

.impersonation-banner[hidden] {
  display: none !important;
}

.btn-impersonation-exit {
  border: 1px solid rgba(255, 255, 255, 0.55);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 700;
}

.btn-impersonation-exit:hover {
  background: rgba(255, 255, 255, 0.22);
}

.btn-impersonation-exit:disabled {
  opacity: 0.6;
  cursor: wait;
}

body.is-impersonating .topbar {
  border-bottom: 2px solid var(--warn);
}

.btn-secondary {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
}

.btn-secondary:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-soft);
}

.btn-secondary:disabled {
  opacity: 0.55;
  cursor: wait;
}

/* Primary solid action (create / confirm) — matches admin record submit language */
.btn-primary,
button.btn-primary {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  margin: 0;
  padding: 0.62rem 1.25rem;
  border: 1px solid var(--primary-strong);
  border-radius: 3.75rem;
  background: var(--primary);
  color: #ffffff;
  font-size: 0.88rem;
  font-weight: 650;
  font-family: var(--font-semibold);
  line-height: 1.2;
  letter-spacing: 0.01em;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0, 56, 48, 0.18);
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.14s ease,
    transform 0.12s ease,
    opacity 0.12s ease;
}

.btn-primary:hover,
button.btn-primary:hover {
  background: var(--primary-strong);
  border-color: var(--ink-900);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 56, 48, 0.22);
}

.btn-primary:focus-visible,
button.btn-primary:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--primary) 55%, #fff);
  outline-offset: 2px;
}

.btn-primary:active,
button.btn-primary:active {
  transform: translateY(1px);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.12) inset,
    0 1px 4px rgba(0, 77, 67, 0.22);
}

.btn-primary:disabled,
button.btn-primary:disabled {
  opacity: 0.55;
  cursor: wait;
  transform: none;
  box-shadow: none;
}

/* —— Home (mockup) —— */
.home-screen {
  min-height: calc(100vh - 72px);
  display: grid;
  place-items: center;
  padding: 48px 24px;
}

.hero {
  width: min(960px, 100%);
  text-align: center;
}

.eyebrow,
.label {
  color: var(--primary);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.02em;
  margin: 0 0 14px;
}

.hero h1 {
  margin: 0;
  font-size: clamp(42px, 7vw, 76px);
  line-height: 0.98;
  letter-spacing: -0.065em;
  font-weight: 800;
}

.hero h1 span {
  color: var(--primary);
}

.search-box {
  width: min(720px, 100%);
  margin: 56px auto 34px;
  padding: 8px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
}

.search-box input,
.follow-up input {
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  padding: 20px 22px;
  font-size: 17px;
  color: var(--text);
  min-width: 0;
}

.search-box input::placeholder,
.follow-up input::placeholder {
  color: #9aa1b8;
}

.search-box button,
.follow-up button,
.side-search button {
  border: 0;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  font-size: 24px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  transition: background var(--transition), transform var(--transition);
}

.search-box button:hover,
.follow-up button:hover,
.side-search button:hover {
  background: var(--primary-hover);
}

.search-box button:disabled {
  opacity: 0.55;
  cursor: wait;
}

.suggestions,
.follow-up-suggestions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.suggestions button,
.follow-up-suggestions button,
.section-heading .btn-soft,
.btn-soft {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.78);
  color: var(--text);
  border-radius: 999px;
  padding: 12px 16px;
  box-shadow: var(--shadow-sm);
  font-weight: 600;
  font-size: 14px;
  transition: border-color var(--transition), color var(--transition), background var(--transition);
}

.suggestions button:hover,
.follow-up-suggestions button:hover,
.btn-soft:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-soft);
}

.status-line {
  margin-top: 20px;
  color: var(--muted);
  font-size: 14px;
}

/* —— Results layout (mockup) —— */
.results-screen {
  padding: 24px;
}

.results-layout {
  width: min(1420px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 320px) minmax(0, 1fr);
  gap: 24px;
}

.project-panel,
.answer-panel {
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.project-panel {
  padding: 24px;
  min-height: calc(100vh - 120px);
  min-width: 0;
}

.back-button {
  border: 0;
  background: transparent;
  color: var(--primary);
  margin-bottom: 24px;
  font-weight: 700;
  padding: 0;
}

.project-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 22px;
  margin-bottom: 24px;
  min-width: 0;
  overflow-wrap: anywhere;
}

.project-card h2 {
  margin: 0 0 12px;
  font-size: 24px;
  line-height: 1.1;
  letter-spacing: -0.04em;
  overflow-wrap: anywhere;
}

.project-card > p:not(.label) {
  color: var(--muted);
  line-height: 1.5;
  margin: 0;
  overflow-wrap: anywhere;
}

.active-search-line {
  background: #eef0eb;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--text);
  display: inline-flex;
  font-weight: 800;
  margin: 0 0 18px;
  padding: 10px 12px;
}

.project-search-context {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 10px;
  margin-top: 18px;
  padding-top: 16px;
  min-width: 0;
  max-width: 100%;
}

.project-search-context p {
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
  margin: 0;
  overflow-wrap: anywhere;
}

.side-search {
  align-items: center;
  background: #eef0eb;
  border: 1px solid var(--line);
  border-radius: 999px;
  display: flex;
  padding: 5px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.side-search input {
  background: transparent;
  border: 0;
  color: var(--text);
  flex: 1 1 0;
  min-width: 0;
  width: 0; /* force flex shrink inside narrow project card */
  outline: 0;
  padding: 9px 10px;
}

.side-search button {
  height: 34px;
  width: 34px;
  flex: 0 0 34px;
  font-size: 16px;
}

.side-nav {
  display: grid;
  gap: 8px;
}

.side-nav button {
  border: 0;
  background: transparent;
  color: var(--muted);
  text-align: left;
  padding: 14px 16px;
  border-radius: 14px;
  font-weight: 600;
}

.side-nav button.active,
.side-nav button:hover {
  background: var(--primary-soft);
  color: var(--primary);
}

.answer-panel {
  padding: 28px;
  min-width: 0;
}

.analysis-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 30px;
}

.analysis-card h2 {
  margin: 0 0 12px;
  font-size: 34px;
  letter-spacing: -0.05em;
  font-weight: 800;
}

.analysis-card > p {
  color: var(--muted);
  line-height: 1.6;
  margin: 0;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 24px 0;
}

.chip {
  background: var(--primary-soft);
  color: var(--primary);
  padding: 9px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  border: 0;
}

.ecosystem-summary {
  display: flex;
  align-items: baseline;
  gap: 10px;
  background: linear-gradient(90deg, var(--primary-soft), #fff);
  border-radius: var(--radius-md);
  padding: 18px;
}

.ecosystem-summary strong {
  font-size: 34px;
  color: var(--primary);
  font-weight: 800;
}

.ecosystem-summary span {
  color: var(--text);
}

.reformulation-block {
  margin-top: 22px;
}

.reformulation-block textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  background: #eef0eb;
  color: var(--text);
  resize: vertical;
  margin-bottom: 10px;
}

.reformulation-block textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: var(--focus-ring);
  background: var(--surface);
}

.section-heading {
  margin: 30px 4px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.section-heading h3 {
  margin: 0;
  font-size: 24px;
  letter-spacing: -0.04em;
  font-weight: 800;
}

.section-heading-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.meta-line {
  margin: 0 4px 14px;
  min-height: 1.2em;
}

.results-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

/* Category groups from API */
.category-group {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.category-title {
  margin: 0 0 4px;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.category-group + .category-group {
  margin-top: 8px;
}

.category-count {
  color: var(--muted);
  font-weight: 600;
  font-size: 14px;
}

.category-items {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

/* Result cards (mockup) */
.result-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  display: grid;
  gap: 10px;
  padding: 16px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  align-content: start;
  min-width: 0;
}

.result-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.result-card h4,
.result-card .result-name {
  margin: 0;
  font-size: 18px;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.result-card h4 .linkish,
.result-card .result-name .linkish {
  color: var(--text);
  font-weight: 800;
  text-decoration: none;
  background: none;
  border: 0;
  padding: 0;
  text-align: left;
  cursor: pointer;
  font: inherit;
}

.result-card h4 .linkish:hover,
.result-card .result-name .linkish:hover {
  color: var(--primary);
}

.result-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.relevance {
  background: var(--primary-soft);
  border-radius: 999px;
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
  padding: 6px 9px;
}

.company-meta-line {
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  font-size: 12px;
  gap: 6px;
}

.company-meta-line span {
  align-items: center;
  display: inline-flex;
}

.company-meta-line span + span::before {
  background: var(--line);
  border-radius: 50%;
  content: "";
  height: 4px;
  margin-right: 6px;
  width: 4px;
}

.compact-contact-line {
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  font-size: 12px;
  gap: 8px;
  min-height: 16px;
}

.compact-contact-line a {
  color: var(--primary);
  font-weight: 700;
  overflow-wrap: anywhere;
  text-decoration: none;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* Needs-list chips use .chips margin; reset when reused on result cards */
.result-card .chips,
.card-tags.chips {
  margin: 0;
}

.card-tags span,
.chips-compact .chip {
  background: #eef0eb;
  border-radius: 999px;
  padding: 7px 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  border: 0;
}

.result-reason,
.reason-stack,
p.reason-text {
  color: var(--text);
  font-size: 13px;
  font-weight: 750;
  margin: 0;
  line-height: 1.4;
}

.why-label {
  font-weight: 800;
}

.result-description {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.company-details {
  border-top: 1px solid var(--line);
  padding-top: 8px;
}

.company-details summary {
  color: var(--primary);
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
}

.company-details p {
  font-size: 13px;
  margin-top: 8px;
  color: var(--muted);
}

.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  border-top: 1px solid var(--line);
  padding-top: 10px;
  min-width: 0;
}

.compare-pick {
  font-size: 12px;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.result-actions .btn-soft,
.result-actions .btn-secondary {
  padding: 8px 12px;
  font-size: 12px;
}

/* Score meter kept for tests / secondary detail */
.result-score {
  display: none;
}

.score-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
}

.score-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.score-value-group {
  display: inline-flex;
  align-items: baseline;
  gap: 0.4rem;
}

.score-value {
  color: var(--text);
  font-weight: 700;
  font-size: 0.88rem;
}

.score-level {
  font-size: 12px;
  font-weight: 700;
  color: var(--primary);
}

.score-bar {
  height: 6px;
  border-radius: 999px;
  background: var(--score-track);
  overflow: hidden;
}

.score-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--score-fill-from), var(--score-fill-to));
  min-width: 2px;
}

.badge-unexpected {
  display: inline-block;
  padding: 0.12rem 0.45rem;
  border-radius: 6px;
  background: var(--warn-soft);
  color: var(--warn);
  font-size: 0.68rem;
  font-weight: 700;
}

.badge-type {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: var(--primary-soft);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--primary);
  /* labels are already humanized in JS — avoid "Appel À Projets" */
  text-transform: none;
}

.contact-block {
  background: #eef0eb;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  margin-top: 10px;
  padding: 12px;
}

.contact-block h5 {
  font-size: 13px;
  margin: 0 0 10px;
}

.contact-list {
  display: grid;
  gap: 8px;
  margin: 0;
}

.contact-list div {
  display: grid;
  gap: 3px;
}

.contact-list dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.contact-list dd {
  margin: 0;
  min-width: 0;
}

.contact-list a {
  color: var(--primary);
  font-weight: 700;
  overflow-wrap: anywhere;
  text-decoration: none;
}

.missing-value {
  color: var(--muted);
}

.follow-up {
  margin: 28px 0 16px;
  padding: 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  display: flex;
  box-shadow: var(--shadow-sm);
}

.follow-up input {
  padding: 16px 20px;
}

.stack-gap {
  display: grid;
  gap: 20px;
}

.stack-gap > [hidden] {
  display: none !important;
}

.filters-details {
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.filters-details summary {
  cursor: pointer;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 10px;
}

.filters-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 16px;
  align-items: flex-end;
}

.filters-row label,
.login-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

.filters-row select,
.filters-row input,
.login-form input,
#rel-status,
#missing-eco,
#act-title,
#act-url,
#act-summary,
#rel-comment,
#rel-rdv {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: #eef0eb;
  color: var(--text);
}

.filters-row select:focus,
.filters-row input:focus,
.login-form input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: var(--focus-ring);
  background: var(--surface);
}

/* Insight block */
.insight-block {
  margin: 16px 0 0;
  color: var(--text);
}

.insight-block .insight-lead {
  margin: 0 0 0.4rem;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--text);
}

.insight-block .insight-bullets {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 14px;
  line-height: 1.45;
  color: var(--text);
}

.insight-block .insight-meta {
  margin: 0.45rem 0 0;
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
}

.error {
  color: var(--error);
  background: var(--error-soft);
  border: 1px solid rgba(180, 35, 24, 0.15);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
  grid-column: 1 / -1;
}

.empty,
.empty-state {
  color: var(--muted);
  padding: 1.15rem 1.1rem;
  font-size: 0.95rem;
  line-height: 1.5;
  grid-column: 1 / -1;
  background: var(--primary-soft);
  border: 1px dashed rgba(0, 77, 67, 0.28);
  border-radius: var(--radius-md);
  margin: 0.35rem 0 0;
}

.panel-lead {
  margin: 0 0 1rem;
  max-width: 62ch;
  line-height: 1.5;
}

.section-hint {
  margin: -0.25rem 0 0.85rem;
  font-size: 0.88rem;
}

.login-hint {
  margin-top: 1.25rem;
  max-width: 42rem;
  font-size: 0.85rem;
  line-height: 1.45;
}

.login-panel h2 {
  margin-top: 0;
}

.stack-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 36rem;
}

.stack-form label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--muted);
}

.stack-form input,
.stack-form textarea {
  font: inherit;
  font-weight: 500;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.75rem;
  background: var(--surface);
}

.stack-form input:focus,
.stack-form textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: var(--focus-ring);
}

.relation-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  background: var(--primary-soft);
  color: var(--primary);
  white-space: nowrap;
}

.status-pill.status-proposee {
  background: #c5e4db;
  color: var(--primary);
}

.status-pill.status-contactee {
  background: #e8f4ff;
  color: #175cd3;
}

.status-pill.status-acceptee {
  background: #e8f8ef;
  color: #067647;
}

.status-pill.status-refusee {
  background: var(--error-soft);
  color: var(--error);
}

.status-pill.status-terminee {
  background: #f2f4f7;
  color: #475467;
}

.consortium-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
  margin-bottom: 0.65rem;
  background: var(--surface);
}

.suggestion-list {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-start;
}

.suggestion-list li {
  margin: 0;
  max-width: 100%;
}

.suggestion-list .suggestion-btn {
  text-align: left;
  white-space: normal;
  line-height: 1.35;
  max-width: 100%;
}

.priority-list,
.action-list,
.missing-list,
.map-list {
  margin: 0.5rem 0 0;
  padding-left: 1.2rem;
  line-height: 1.45;
}

.brief-summary {
  margin: 0;
  line-height: 1.55;
}

.muted {
  color: var(--muted);
  font-size: 0.9rem;
}

.result-meta {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0 0 0.75rem;
}

/* Loading placeholder in results grid */
#results-loading {
  color: var(--primary);
  font-weight: 700;
}

/* Dialog / fiche partenaire — near full-window popup */
dialog#fiche-modal {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  color: var(--text);
  width: min(96vw, 1280px);
  max-width: 96vw;
  height: min(94vh, 980px);
  max-height: 94vh;
  padding: 0;
  margin: auto;
  box-shadow: 0 32px 100px rgba(18, 33, 27, 0.22);
  overflow: hidden;
}

dialog#fiche-modal[open] {
  display: flex;
  flex-direction: column;
}

dialog#fiche-modal::backdrop {
  background: rgba(18, 33, 27, 0.52);
  backdrop-filter: blur(5px);
}

.modal-inner {
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
  max-height: 100%;
  margin: 0;
  flex: 1 1 auto;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem 1.5rem;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #eef0eb 0%, var(--surface) 100%);
  flex: 0 0 auto;
}

.modal-header-copy {
  min-width: 0;
}

.modal-kicker {
  margin: 0 0 2px;
  color: var(--primary);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.modal-header h2 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
}

.modal-close {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 1.45rem;
  line-height: 1;
  cursor: pointer;
  flex: 0 0 auto;
  transition: border-color var(--transition), color var(--transition), background var(--transition);
}

.modal-close:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-soft);
}

.fiche-body {
  padding: 0 1.5rem 1.6rem;
  overflow: hidden; /* scroll lives in .fiche-main so CTAs stay pinned */
  min-height: 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  scrollbar-gutter: stable;
}

/* Loading / error placeholders still need to scroll if tall */
.fiche-body > .fiche-loading,
.fiche-body > .muted,
.fiche-body > .error {
  overflow: auto;
}

.fiche-body > .muted,
.fiche-body > .error {
  margin: 1.25rem 0 0.5rem;
}

.fiche-loading {
  display: grid;
  gap: 12px;
  padding: 1.25rem 0 0.5rem;
}

.fiche-loading-bar {
  height: 12px;
  border-radius: 999px;
  background: linear-gradient(90deg, #eef0f8 0%, #eef0eb 50%, #eef0f8 100%);
  background-size: 200% 100%;
  animation: fiche-shimmer 1.1s ease-in-out infinite;
}

.fiche-loading-bar.wide {
  width: 72%;
  height: 18px;
}

.fiche-loading-bar.mid {
  width: 48%;
}

.fiche-loading-bar.block {
  height: 72px;
  border-radius: var(--radius-sm);
  width: 100%;
}

@keyframes fiche-shimmer {
  0% {
    background-position: 100% 0;
  }
  100% {
    background-position: -100% 0;
  }
}

/* —— Fiche content —— */
.fiche {
  padding-top: 1.35rem;
  display: flex;
  flex-direction: column;
  gap: 0;
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
}

/* Scrollable main; CTAs pinned below so Message never leaves the viewport */
.fiche-main {
  display: grid;
  gap: 1.3rem;
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding-bottom: 0.35rem;
  scrollbar-gutter: stable;
}

.fiche-actions--cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  flex: 0 0 auto;
  margin-top: 0;
  padding: 0.9rem 0 0.1rem;
  background: var(--surface);
  border-top: 1px solid var(--line);
  box-shadow: 0 -8px 20px rgba(18, 33, 27, 0.04);
}

.fiche-hero {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.fiche-avatar {
  width: 64px;
  height: 64px;
  border-radius: 20px;
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: -0.03em;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid rgba(0, 77, 67, 0.12);
}

.fiche-hero-copy {
  min-width: 0;
  flex: 1;
}

.fiche-kicker {
  margin: 0 0 4px;
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.fiche-title,
.fiche .entity-header h3,
.fiche > h3 {
  margin: 0;
  font-size: clamp(1.5rem, 2.6vw, 1.85rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.15;
  color: var(--text);
}

.fiche-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.fiche-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 11px;
  border-radius: 999px;
  background: #eef0eb;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  border: 1px solid var(--line);
}

.fiche-badge-eco {
  background: var(--primary-soft);
  color: var(--primary);
  border-color: transparent;
}

.fiche-desc,
.fiche .prose {
  margin: 0;
  font-size: 1rem;
  line-height: 1.65;
  max-width: 72ch;
  color: var(--text);
}

.fiche-desc p,
.fiche .prose p,
.fiche-section-rich p {
  margin: 0 0 0.65rem;
}

.fiche-desc p:last-child,
.fiche .prose p:last-child,
.fiche-section-rich p:last-child {
  margin-bottom: 0;
}

.fiche-bullet-list {
  margin: 0.35rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.fiche-bullet-list li {
  position: relative;
  padding: 10px 12px 10px 2rem;
  background: #eef0eb;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  line-height: 1.45;
  color: var(--text);
}

.fiche-bullet-list li::before {
  content: "";
  position: absolute;
  left: 0.85rem;
  top: 1rem;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--primary);
}

.fiche-empty {
  margin: 0;
}

.fiche-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.fiche-action {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  border-radius: 999px;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition: border-color var(--transition), color var(--transition), background var(--transition);
}

.fiche-action:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-soft);
}

.fiche-action-primary {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 8px 22px rgba(0, 77, 67, 0.28);
}

.fiche-action-primary:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
  color: #fff;
}

.fiche-action:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  pointer-events: none;
}

.fiche-private-contact[hidden] {
  display: none !important;
}

.ticket-create-peer-hint {
  margin: 0 0 0.85rem;
  font-size: 0.92rem;
  line-height: 1.4;
}

.fiche-section {
  border-top: 1px solid var(--line);
  padding-top: 1rem;
}

.fiche-section-title {
  margin: 0 0 0.65rem;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--primary);
}

.fiche-section-text {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--text);
  white-space: pre-wrap;
}

.fiche-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.fiche-chips .chip {
  background: #eef0eb;
  color: var(--muted);
  border: 0;
  margin: 0;
}

.fiche-section-contact {
  background: linear-gradient(180deg, #eef0eb 0%, #eef0eb 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  border-top: 1px solid var(--line);
}

.fiche-contact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 16px;
}

.fiche-contact-item {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.fiche-contact-label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.fiche-contact-value {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  overflow-wrap: anywhere;
}

.fiche-contact-value a {
  color: var(--primary);
  font-weight: 700;
  text-decoration: none;
}

.fiche-contact-value a:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.fiche-facts,
.fiche-dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 14px;
  margin: 0;
}

.fiche-fact {
  background: #eef0eb;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  min-width: 0;
}

.fiche-fact dt,
.fiche-dl dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin: 0 0 4px;
}

.fiche-fact dd,
.fiche-dl dd {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text);
  overflow-wrap: anywhere;
}

@media (max-width: 560px) {
  .fiche-contact-grid,
  .fiche-facts,
  .fiche-dl {
    grid-template-columns: 1fr;
  }

  .fiche-hero {
    gap: 12px;
  }

  .fiche-avatar {
    width: 48px;
    height: 48px;
    border-radius: 14px;
  }

  .modal-header,
  .fiche-body {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}

.compare-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

/* Suggestions list (outils panel) */
#suggestions .suggestions,
ul.suggestions {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.suggestion-btn {
  width: 100%;
  text-align: left;
  appearance: none;
  border: 1px solid var(--line);
  background: #eef0eb;
  color: var(--text);
  border-radius: var(--radius-sm);
  padding: 0.7rem 0.9rem;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
}

.suggestion-btn:hover {
  border-color: var(--primary);
  background: var(--primary-soft);
  color: var(--primary);
}

/* Step lists */
.step-list,
.value-chain,
.roadmap {
  margin: 0;
  padding-left: 0;
  list-style: none;
  counter-reset: step;
}

.step-list li,
.value-chain li,
.roadmap li {
  position: relative;
  margin-bottom: 0.4rem;
  padding: 0.5rem 0.7rem 0.5rem 2.2rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #eef0eb;
  font-size: 0.9rem;
  line-height: 1.35;
}

.step-list li::before,
.value-chain li::before,
.roadmap li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0.5rem;
  top: 0.5rem;
  width: 1.2rem;
  height: 1.2rem;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 0.68rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.step-list .step-title,
.value-chain .step-title,
.roadmap .step-title {
  display: block;
  font-weight: 800;
  margin-bottom: 0.1rem;
}

.step-list .step-detail,
.value-chain .step-detail,
.roadmap .step-detail {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
}

.opportunities-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 12px;
}

.opportunity-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.opportunity-card header {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}

.opportunity-card header strong {
  font-size: 16px;
  font-weight: 800;
}

/* —— BO layout (shared tokens) —— */
.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.wrap,
.wrap-wide {
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: 1.75rem 1.35rem 4.5rem;
  flex: 1;
}

/* —— Full-width app shell + left rail —— */
body.has-app-shell {
  --rail-w: 268px;
  overflow: hidden;
  height: 100vh;
  padding-bottom: 0;
  transition: --rail-w 0.2s ease;
}

body.has-app-shell.rail-collapsed {
  --rail-w: 72px;
}

body.has-app-shell .topbar {
  height: 56px;
  flex-shrink: 0;
  /* Topbar only over the content column — rail is full-height brand chrome */
  margin-left: var(--rail-w, 268px);
  padding: 0 1.25rem;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 30;
  transition: margin-left 0.2s ease, padding 0.2s ease;
  justify-content: flex-end;
  width: auto;
  box-sizing: border-box;
}

body.has-app-shell .topbar .brand {
  display: none;
}

body.has-app-shell .topbar-actions {
  margin-left: auto;
  margin-right: 0;
  justify-content: flex-end;
  flex-shrink: 0;
}

body.has-app-shell .topbar-actions #user-label {
  margin-right: 0.15rem;
  font-size: 0.88rem;
  font-weight: 650;
  white-space: nowrap;
  max-width: 14rem;
  overflow: hidden;
  text-overflow: ellipsis;
}

.app-shell {
  /* Rail is position:fixed (out of flow). Content column is offset by --rail-w
     so .app-stage is not auto-placed under the rail in a zero-width track. */
  display: block;
  flex: 1;
  min-height: 0;
  min-width: 0;
  width: auto;
  max-width: none;
  margin: 0 0 0 var(--rail-w, 268px);
  padding: 0;
  height: calc(100vh - 56px);
  overflow: hidden;
  transition: margin-left 0.2s ease;
}

body.is-impersonating.has-app-shell .app-shell {
  height: calc(100vh - 56px - 44px);
}

.app-rail {
  /* Full-height fixed brand column — no light topbar strip above it */
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  height: 100dvh;
  width: var(--rail-w);
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding: 1rem 0.95rem 1rem;
  background:
    radial-gradient(520px 360px at 0% 0%, rgba(193, 247, 105, 0.08), transparent 55%),
    linear-gradient(180deg, #1a2823 0%, #313a37 55%, #2a322f 100%);
  color: #eef2ef;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  overflow: hidden auto;
  z-index: 25;
  transition: width 0.2s ease, padding 0.2s ease, top 0.2s ease, height 0.2s ease;
  box-sizing: border-box;
}

body.is-impersonating .app-rail {
  /* Banner stays full-width above both columns */
  top: 44px;
  height: calc(100vh - 44px);
  height: calc(100dvh - 44px);
}

.rail-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
  min-height: 2.5rem;
}

.rail-toggle {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(238, 242, 239, 0.85);
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background 0.15s ease, color 0.15s ease, transform 0.2s ease;
}

.rail-toggle:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.rail-toggle-icon {
  display: block;
  transform: translateY(-1px);
}

body.rail-collapsed .rail-toggle-icon {
  transform: translateY(-1px) rotate(180deg);
}

body.rail-collapsed .app-rail {
  padding: 0.9rem 0.55rem 0.85rem;
  align-items: center;
}

body.rail-collapsed .rail-top {
  flex-direction: column;
  gap: 0.55rem;
}

body.rail-collapsed .rail-brand {
  justify-content: center;
  padding: 0;
}

body.rail-collapsed .rail-brand-text,
body.rail-collapsed .rail-tab-label,
body.rail-collapsed .rail-nav-section-label,
body.rail-collapsed .rail-link-label,
body.rail-collapsed .rail-foot-note {
  display: none;
}

body.rail-collapsed .rail-nav.tabs {
  gap: 0.45rem;
}

body.rail-collapsed .rail-nav-section {
  gap: 0.15rem;
  padding-top: 0.2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

body.rail-collapsed .rail-nav-section:first-child {
  padding-top: 0;
  border-top: 0;
}

body.rail-collapsed .rail-nav .tab {
  justify-content: center;
  padding: 0.75rem 0.4rem;
}

body.rail-collapsed .rail-tab-dot {
  width: 0.55rem;
  height: 0.55rem;
}

body.rail-collapsed .rail-foot {
  align-items: center;
  width: 100%;
}

body.rail-collapsed .rail-link {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  text-decoration: none !important;
  font-size: 0;
}

body.rail-collapsed .rail-link::before {
  content: "↗";
  font-size: 0.95rem;
  color: rgba(238, 242, 239, 0.8);
}

.rail-brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.1rem 0.35rem 0.35rem;
  min-width: 0;
}

.rail-brand-text {
  min-width: 0;
}

.rail-brand .brand-symbol {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: rgba(0, 77, 67, 0.25);
  color: #9fd4c8;
  display: grid;
  place-items: center;
  font-size: 1rem;
}

.rail-brand strong {
  display: block;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #fff;
}

.rail-brand span {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  color: rgba(238, 242, 239, 0.55);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* Vertical nav in rail */
.rail-nav.tabs {
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  gap: 0.65rem;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0.25rem;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.rail-nav-section {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

/* Hide section when every tab is role/company-hidden */
.rail-nav-section:not(:has(.tab:not([hidden]))) {
  display: none;
}

.rail-nav-section-label {
  margin: 0;
  padding: 0.35rem 0.8rem 0.15rem;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(238, 242, 239, 0.42);
  line-height: 1.2;
  user-select: none;
}

.rail-nav-section:first-child .rail-nav-section-label {
  padding-top: 0.1rem;
}

.rail-nav .tab {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  text-align: left;
  justify-content: flex-start;
  padding: 0.7rem 0.8rem;
  border-radius: 12px;
  border: 0;
  background: transparent;
  color: rgba(238, 242, 239, 0.72);
  font-size: 0.9rem;
  font-weight: 650;
  transition: background 140ms ease, color 140ms ease;
}

.rail-nav .tab:hover {
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
}

.rail-nav .tab.active {
  background: linear-gradient(90deg, rgba(0, 77, 67, 0.35), rgba(0, 77, 67, 0.12));
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(0, 77, 67, 0.35);
}

.rail-tab-dot {
  width: 0.35rem;
  height: 0.35rem;
  border-radius: 50%;
  background: transparent;
  flex-shrink: 0;
  box-shadow: inset 0 0 0 1px rgba(238, 242, 239, 0.28);
}

.rail-nav .tab.active .rail-tab-dot {
  background: #7dd3c8;
  box-shadow: none;
}

.rail-nav .tab[data-tab="members"].active .rail-tab-dot,
.rail-nav .tab[data-tab="tenders"].active .rail-tab-dot,
.rail-nav .tab[data-tab="subsidies"].active .rail-tab-dot,
.rail-nav .tab[data-tab="news"].active .rail-tab-dot,
.rail-nav .tab[data-tab="matches"].active .rail-tab-dot,
.rail-nav .tab[data-tab="users"].active .rail-tab-dot {
  background: #7dd3c8;
}

.rail-aside {
  margin-top: 0.35rem;
  padding: 0.75rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.rail-aside-label {
  margin: 0 0 0.45rem;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(238, 242, 239, 0.45);
}

.rail-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.rail-pill {
  font-size: 0.68rem;
  font-weight: 650;
  padding: 0.22rem 0.5rem;
  border-radius: 999px;
  background: rgba(0, 77, 67, 0.22);
  color: #b7dcd2;
  border: 1px solid rgba(0, 77, 67, 0.28);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rail-pill--muted {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.08);
  color: rgba(238, 242, 239, 0.55);
}

.rail-foot {
  margin-top: auto;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.rail-link {
  color: rgba(238, 242, 239, 0.75) !important;
  font-size: 0.85rem;
}

.rail-link:hover {
  color: #fff !important;
}

.rail-foot-note {
  margin: 0;
  font-size: 0.7rem;
  color: rgba(238, 242, 239, 0.35);
}

/* ——— Andoris credit (« Propulsé par ») ——— */
.powered-by {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  text-align: center;
  width: 100%;
}

.powered-by-label {
  margin: 0;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  line-height: 1.2;
}

.powered-by-logo {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  object-fit: contain;
  margin-inline: auto;
}

.powered-by--login {
  margin-top: auto;
  padding: 0.85rem clamp(1.35rem, 3vw, 2.1rem) clamp(1.1rem, 2.5vh, 1.6rem);
  border-top: 1px solid var(--line);
  flex-shrink: 0;
}

.powered-by--login .powered-by-label {
  color: var(--muted);
  font-size: 0.68rem;
}

/* White transparent mark: seat on a dark chip so it stays legible on the light form column */
.powered-by--login .powered-by-logo {
  width: 7.5rem;
  padding: 0.45rem 0.65rem;
  border-radius: 10px;
  background: #0b1220;
  box-shadow: 0 1px 2px rgba(18, 33, 27, 0.08);
}

.powered-by--rail {
  margin-top: 0.15rem;
  padding-top: 0.55rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.powered-by--rail .powered-by-label {
  color: rgba(238, 242, 239, 0.38);
}

/* Rail is already dark — white mark on transparent background */
.powered-by--rail .powered-by-logo {
  width: 6.75rem;
  opacity: 0.9;
}

body.rail-collapsed .powered-by--rail .powered-by-label {
  display: none;
}

body.rail-collapsed .powered-by--rail {
  padding-top: 0.4rem;
  border-top: 0;
}

body.rail-collapsed .powered-by--rail .powered-by-logo {
  width: 2.15rem;
}

.app-stage {
  min-width: 0;
  min-height: 0;
  height: 100%;
  overflow: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 1.15rem 1.5rem 2.5rem;
  /* Quiet stage ground — content hierarchy (not muddy wash + equal float) carries depth */
  background:
    radial-gradient(ellipse 65% 42% at 100% 0%, rgba(0, 77, 67, 0.045), transparent 55%),
    radial-gradient(ellipse 48% 36% at 0% 100%, rgba(0, 77, 67, 0.03), transparent 50%),
    var(--bg);
}

.app-shell--admin .app-stage {
  padding: 0;
  display: flex;
  flex-direction: column;
}

.app-stage .tab-panel {
  max-width: none;
  width: 100%;
}

.app-shell--admin .app-stage > .tab-panel {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.app-shell--admin .app-stage > .tab-panel.hidden {
  display: none;
}

.app-shell--admin .app-stage > .tab-panel:not(.hidden) > .dashboard,
.app-shell--admin .app-stage > .tab-panel:not(.hidden) > .tab-shell {
  padding: 1.15rem 1.5rem 2.5rem;
  overflow: auto;
  flex: 1;
  min-height: 0;
}

.dash-hero--wide {
  grid-template-columns: 1fr;
}

.dash-pill--member {
  background: rgba(0, 77, 67, 0.12);
  border-color: rgba(0, 77, 67, 0.25);
  color: var(--primary);
}

/* Wider content grids when stage is large */
@media (min-width: 1280px) {
  .card-list--grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .dash-explore {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .filters-compact .filters-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

@media (min-width: 1600px) {
  body.has-app-shell:not(.rail-collapsed) {
    --rail-w: 292px;
  }

  .card-list--grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .dash-metrics {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .dash-metrics--admin {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  /*
   * Page-level horizontal scroll was the real “bell exits the screen” bug:
   * sticky topbar only sticks on the Y axis, so any wide child (tables, heroes)
   * made the document wider than the viewport and scrolled the chrome away.
   *
   * Mobile scroll model = document/body is the ONLY vertical scroller.
   * Do not leave overflow-x:auto alone on .app-stage (CSS pairs the other axis
   * to auto) while a flex height chain still clamps the stage to the viewport —
   * that traps Marchés / Financements / Actualités / Annuaire with nowhere to
   * scroll. Wide tables scroll inside .table-scroll instead.
   */
  html {
    overflow-x: hidden;
    height: auto;
  }

  body.has-app-shell {
    --rail-w: 0px;
    overflow-x: hidden;
    overflow-y: auto;
    height: auto;
    min-height: 100vh;
    min-height: 100dvh;
    max-width: 100%;
    /* Break the desktop “viewport shell” flex trap */
    display: block;
  }

  body.has-app-shell.nav-open {
    overflow: hidden;
    /* Prevent background scroll while the drawer is open */
    touch-action: none;
  }

  /*
   * Icon chrome only on mobile (~3 × 40px + gaps fits 320px):
   *   [burger] [logo] ·············· [🔔] [logout]
   * Wordmark, user name, portal switcher, and “Déconnexion” text all drop;
   * wordmark lives in the rail, labels via aria-label / title.
   * position:fixed pins chrome to the visual viewport even if a child still
   * overflows (defense in depth with overflow-x:hidden above).
   */
  body.has-app-shell .topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    margin-left: 0 !important;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 0 0.55rem;
    height: 48px;
    min-height: 48px;
    justify-content: flex-start;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: nowrap;
    overflow: visible; /* notif panel */
    /* Above content (30) and nav drawer (40) so burger stays the close control */
    z-index: 50;
  }

  body.is-impersonating.has-app-shell .topbar {
    top: 44px; /* sit below the full-width impersonation banner */
  }

  /* Reserve space for fixed topbar (banner stays in normal flow when present) */
  body.has-app-shell .app-shell {
    margin-top: 48px;
  }

  body.has-app-shell .topbar .brand {
    display: flex;
    flex: 0 0 auto;
    min-width: 0;
    gap: 0;
  }

  body.has-app-shell .topbar .brand .brand-symbol {
    width: 1.85rem;
    height: 1.85rem;
    border-radius: 8px;
    flex-shrink: 0;
  }

  /* Wordmark: rail already shows Orvex · Avenia */
  body.has-app-shell .topbar .brand > span:last-child {
    display: none;
  }

  body.has-app-shell .topbar-actions {
    flex: 0 0 auto;
    margin-left: auto;
    gap: 0.3rem;
    justify-content: flex-end;
    flex-wrap: nowrap;
  }

  body.has-app-shell .topbar-actions #user-label,
  body.has-app-shell .topbar-actions .topbar-user-label,
  body.has-app-shell .topbar-actions a.topbar-link[href="/"],
  body.has-app-shell .topbar-actions a.topbar-link[href="/admin.html"] {
    display: none !important;
  }

  body.has-app-shell .nav-burger,
  body.has-app-shell .topbar-actions .notif-bell,
  body.has-app-shell .topbar-actions .topbar-logout {
    width: 2.35rem;
    height: 2.35rem;
    min-width: 2.35rem;
    padding: 0;
    border-radius: 12px;
  }

  body.has-app-shell .topbar-actions .notif-wrap {
    margin-right: 0.6rem;
  }

  body.has-app-shell .topbar-actions .topbar-logout {
    display: inline-grid;
    place-items: center;
    gap: 0;
  }

  body.has-app-shell .topbar-actions .topbar-logout-icon {
    display: block;
  }

  body.has-app-shell .topbar-actions .topbar-logout-label {
    display: none;
  }

  /* Burger visible only when shell is active (hidden attr cleared by JS) */
  body.has-app-shell .nav-burger:not([hidden]) {
    display: grid;
  }

  body.has-app-shell.nav-open .nav-burger {
    background: var(--primary-soft);
    border-color: rgba(0, 77, 67, 0.32);
    color: var(--primary);
  }

  /* X icon when open */
  body.has-app-shell.nav-open .nav-burger-icon svg path:nth-child(1) {
    transform: translateY(5px) rotate(45deg);
  }

  body.has-app-shell.nav-open .nav-burger-icon svg path:nth-child(2) {
    opacity: 0;
  }

  body.has-app-shell.nav-open .nav-burger-icon svg path:nth-child(3) {
    transform: translateY(-5px) rotate(-45deg);
  }

  body.has-app-shell .nav-burger-icon svg path {
    transform-box: fill-box;
    transform-origin: center;
    transition: transform 0.2s ease, opacity 0.15s ease;
  }

  .nav-backdrop:not([hidden]) {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 35;
    background: rgba(18, 33, 27, 0.48);
    backdrop-filter: blur(2px);
    border: 0;
    padding: 0;
    margin: 0;
    cursor: pointer;
    animation: nav-backdrop-in 0.2s ease;
  }

  @keyframes nav-backdrop-in {
    from { opacity: 0; }
    to { opacity: 1; }
  }

  /* Full-width content; rail is off-canvas drawer (no left offset) */
  body.has-app-shell .app-shell,
  .app-shell {
    display: block;
    /* Do not flex-grow into a fixed viewport slot — let content define height */
    flex: none;
    height: auto !important;
    min-height: 0;
    max-height: none;
    margin-left: 0 !important;
    width: 100%;
    max-width: 100%;
    /* Keep vertical offset for fixed topbar; do not zero margin-top here */
    overflow: visible;
  }

  body.has-app-shell .app-stage,
  .app-stage {
    max-width: 100%;
    min-width: 0;
    /*
     * Do NOT set overflow-x:hidden here with overflow-y:visible — CSS pairs the
     * visible axis to auto, which re-creates a non-scrolling clip box when a
     * parent still has a bounded height. Horizontal clamp is on body/html.
     */
    overflow: visible !important;
    height: auto !important;
    max-height: none;
    min-height: 0;
  }

  /* Off-canvas drawer for menu items */
  .app-rail {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    height: 100vh;
    height: 100dvh;
    width: min(288px, 86vw);
    max-width: 100%;
    flex-direction: column;
    padding: 1rem 0.95rem 1rem;
    z-index: 40;
    transform: translateX(-105%);
    transition: transform 0.22s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: none;
    overflow: hidden auto;
    overscroll-behavior: contain;
    /* Keep off-screen drawer out of accessibility tree until open */
    visibility: hidden;
    pointer-events: none;
  }

  body.has-app-shell.nav-open .app-rail {
    transform: translateX(0);
    box-shadow: 8px 0 40px -12px rgba(18, 33, 27, 0.45);
    visibility: visible;
    pointer-events: auto;
  }

  /* Drawer covers the viewport; banner may sit under it while open */
  body.is-impersonating .app-rail {
    top: 0;
    height: 100vh;
    height: 100dvh;
  }

  /* Drawer always shows full labels (ignore desktop collapsed state) */
  body.rail-collapsed .app-rail {
    width: min(288px, 86vw);
    align-items: stretch;
    padding: 1rem 0.95rem 1rem;
  }

  body.rail-collapsed .rail-top {
    flex-direction: row;
  }

  body.rail-collapsed .rail-brand-text,
  body.rail-collapsed .rail-tab-label,
  body.rail-collapsed .rail-nav-section-label,
  body.rail-collapsed .rail-link-label,
  body.rail-collapsed .rail-foot-note,
  body.rail-collapsed .powered-by--rail .powered-by-label {
    display: block;
  }

  body.rail-collapsed .rail-nav-section {
    padding-top: 0;
    border-top: 0;
  }

  body.rail-collapsed .rail-nav .tab {
    justify-content: flex-start;
    padding: 0.7rem 0.8rem;
  }

  body.rail-collapsed .rail-link {
    width: auto;
    height: auto;
    font-size: inherit;
    background: transparent;
    border: 0;
    display: inline;
  }

  body.rail-collapsed .rail-link::before {
    content: none;
  }

  body.rail-collapsed .powered-by--rail {
    align-items: center;
    padding-top: 0.55rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
  }

  body.rail-collapsed .powered-by--rail .powered-by-logo {
    width: 6.75rem;
  }

  /* Collapse control is desktop-only; burger owns mobile nav */
  .rail-toggle {
    display: none;
  }

  .rail-nav.tabs {
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 0.65rem;
  }

  .rail-nav .tab {
    width: 100%;
    padding: 0.7rem 0.8rem;
    font-size: 0.9rem;
  }

  .rail-aside {
    display: none;
  }

  .rail-foot {
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
  }

  .app-stage {
    height: auto !important;
    overflow: visible !important;
    padding: 0.85rem 0.85rem 2.75rem;
  }

  /*
   * Admin shell keeps nested flex scroll regions on desktop. On mobile those
   * regions have no usable height budget → freeze. Flatten to document flow.
   */
  .app-shell--admin .app-stage {
    display: block;
    overflow: visible;
  }

  .app-shell--admin .app-stage > .tab-panel,
  .app-shell--admin .app-stage > .tab-panel:not(.hidden) {
    display: block;
    flex: none;
    min-height: 0;
    height: auto;
    overflow: visible;
  }

  .app-shell--admin .app-stage > .tab-panel:not(.hidden) > .dashboard,
  .app-shell--admin .app-stage > .tab-panel:not(.hidden) > .tab-shell,
  .app-shell--admin .app-stage > .tab-panel:not(.hidden) > .admin-corpus-view,
  .app-shell--admin .app-stage > .tab-panel:not(.hidden) > .admin-corpus-view[data-admin-corpus-view="consult"] {
    flex: none;
    min-height: 0;
    height: auto;
    max-height: none;
    overflow: visible;
    padding-left: 0.85rem;
    padding-right: 0.85rem;
    padding-bottom: 2.75rem;
  }

  .tab-shell {
    min-height: 0;
    height: auto;
    overflow: visible;
  }

  /* Extra bottom room so the pager isn't under the home indicator */
  .pager {
    padding-bottom: max(0.5rem, env(safe-area-inset-bottom, 0px));
  }
}

@media (max-width: 900px) and (prefers-reduced-motion: reduce) {
  .app-rail {
    transition: none;
  }

  .nav-backdrop:not([hidden]) {
    animation: none;
  }

  body.has-app-shell .nav-burger-icon svg path {
    transition: none;
  }
}

/* BO top chrome mirrors mockup topbar */
.page > .topbar + .wrap,
.page .hero-band {
  /* legacy class: restyle as soft header card */
}

.hero-band {
  background: transparent;
  color: var(--text);
  padding: 0;
  overflow: visible;
}

.hero-band::after {
  display: none;
}

.hero-band-inner {
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: 28px 24px 0;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1.5rem 2rem;
  align-items: start;
}

.hero-nav {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}

.hero-nav a,
.hero-nav .linkish {
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  cursor: pointer;
  font-family: inherit;
}

.hero-nav a:hover,
.hero-nav .linkish:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-soft);
}

.hero-copy {
  max-width: 36rem;
}

.hero-eyebrow {
  color: var(--primary);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.02em;
  margin: 0 0 12px;
  text-transform: none;
}

.hero-band h1 {
  margin: 0 0 8px;
  font-size: clamp(1.35rem, 2.5vw, 1.75rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.15;
  color: var(--text);
}

.hero-band .hero-lead {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--muted);
}

/* Compact page chrome so Accueil dashboard owns the visual stage */
.page .hero-band-inner {
  padding: 12px 24px 4px;
}

.page .tabs {
  margin-top: 0.35rem;
}

.hero-stats {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 0.35rem 0;
  min-width: 220px;
  box-shadow: var(--shadow-sm);
}

.hero-stat {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.65rem 1rem;
  align-items: baseline;
  padding: 0.75rem 1.15rem;
  border-bottom: 1px solid var(--line);
}

.hero-stat:last-child {
  border-bottom: none;
}

.hero-stat-value {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--primary);
}

.hero-stat-label {
  font-size: 0.85rem;
  color: var(--muted);
}

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 1.1rem 1.2rem;
  margin-bottom: 1.15rem;
  box-shadow: var(--shadow-sm);
}

.panel h2 {
  margin: 0 0 0.55rem;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
  font-weight: 700;
}

.section-title {
  margin: 0 0 0.25rem;
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--text);
}

.btn-secondary,
button.btn-secondary {
  appearance: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.55rem 0.95rem;
  background: var(--surface);
  color: var(--text);
  font-weight: 700;
  font-size: 0.88rem;
  font-family: inherit;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover,
button.btn-secondary:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-soft);
}

.linkish {
  appearance: none;
  background: none;
  border: none;
  color: var(--primary);
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  padding: 0;
  text-align: left;
}

.linkish:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 1.15rem;
  padding: 0.3rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  width: fit-content;
  max-width: 100%;
  box-shadow: var(--shadow-sm);
}

.tab {
  appearance: none;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  border-radius: 999px;
  padding: 0.48rem 0.95rem;
  cursor: pointer;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
}

.tab:hover:not(.active) {
  color: var(--text);
  background: #eef0eb;
}

.tab.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(0, 77, 67, 0.28);
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.15rem;
}

.kpi-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 0.95rem 0.85rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.kpi-value {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.03em;
}

.kpi-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
  margin-top: 0.25rem;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.data-table th,
.data-table td {
  border-bottom: 1px solid var(--line);
  padding: 0.6rem 0.45rem;
  text-align: left;
  vertical-align: top;
}

.data-table th {
  color: var(--muted);
  font-weight: 700;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: #eef0eb;
}

.data-table tbody tr:hover td {
  background: #eef0eb;
}

.data-table .cell-ellipsis {
  max-width: 22rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: help;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  max-width: 360px;
}

.login-form button[type="submit"] {
  appearance: none;
  border: none;
  border-radius: 999px;
  padding: 0.72rem 1.4rem;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  font-size: 0.92rem;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 77, 67, 0.28);
}

.login-form button[type="submit"]:hover {
  background: var(--primary-hover);
}

.login-form code {
  background: #eef0eb;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  font-size: 0.85em;
  border: 1px solid var(--line);
}

.form-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.5rem 0 1rem;
}

.filter-pill {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  border-radius: 999px;
  padding: 0.42rem 0.9rem;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}

.filter-pill:hover {
  border-color: var(--border-strong);
  background: #eef0eb;
}

.filter-pill.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 2px 8px rgba(0, 77, 67, 0.25);
}

.synergy-map {
  width: 100%;
  max-height: 380px;
  background: #eef0eb;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
}

.newsletter-pre {
  white-space: pre-wrap;
  background: #eef0eb;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.9rem;
  font-size: 0.85rem;
  max-height: 360px;
  overflow: auto;
  color: var(--text);
}

.multi-results {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0 0;
}

.multi-results li {
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--line);
}

::selection {
  background: rgba(0, 77, 67, 0.15);
  color: var(--text);
}

@media (max-width: 980px) {
  .results-layout {
    grid-template-columns: 1fr;
  }

  .project-panel {
    min-height: auto;
  }

  .results-grid,
  .category-items {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    font-size: 42px;
  }

  .topbar {
    padding: 0 16px;
    height: auto;
    min-height: 72px;
    flex-wrap: wrap;
    padding-top: 12px;
    padding-bottom: 12px;
  }

  .hero-band-inner {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .compare-grid {
    grid-template-columns: 1fr;
  }

  .search-box {
    margin-top: 36px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }

  .result-card:hover {
    transform: none;
  }
}

@media print {
  body {
    background: #fff;
    color: #111;
  }

  .topbar-actions,
  .side-nav,
  .follow-up,
  .follow-up-suggestions,
  .result-actions,
  .tabs {
    display: none !important;
  }

  .result-card,
  .project-panel,
  .answer-panel,
  .panel {
    break-inside: avoid;
    box-shadow: none;
  }
}

/* —— Portail Avenia v2 —— */
.page {
  padding-bottom: 64px;
}

.wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 24px 48px;
}

.wrap-wide {
  max-width: 1100px;
}

.login-panel {
  margin-top: 24px;
}

.login-form {
  display: grid;
  gap: 14px;
  margin-top: 20px;
}

.login-form label,
.admin-form label,
.filters-grid label {
  display: grid;
  gap: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--muted);
  min-width: 0; /* allow grid track to shrink below select content width */
}

.login-form input,
.admin-form input,
.admin-form select,
.admin-form textarea,
.filters-grid input,
.filters-grid select {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
}

/* Native <select> otherwise expands to longest <option> and blows the grid */
.filters-grid select,
.admin-form select {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.login-form button,
.admin-form button[type="submit"],
.admin-record-actions button[type="submit"],
.filters-actions button[type="submit"] {
  margin-top: 8px;
  padding: 12px 18px;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--primary);
  color: #fff;
  font-weight: 600;
}

.admin-record-actions button[type="submit"] {
  margin-top: 0;
  padding: 9px 16px;
}

.login-form button:hover,
.admin-form button[type="submit"]:hover,
.admin-record-actions button[type="submit"]:hover {
  background: var(--primary-hover);
}

.login-hint {
  margin-top: 16px;
  font-size: 0.85rem;
}

.login-hint code {
  font-size: 0.8rem;
  background: var(--bg-subtle);
  padding: 2px 6px;
  border-radius: 6px;
}

.login-demo {
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--line);
}

.login-demo .login-hint {
  margin: 0 0 0.55rem;
}

.login-demo-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.login-demo-row {
  appearance: none;
  width: 100%;
  display: grid;
  grid-template-columns: 7.5rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.5rem 0.75rem;
  text-align: left;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  border-radius: 12px;
  padding: 0.55rem 0.75rem;
  font-size: 0.82rem;
  cursor: pointer;
  transition: background 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
}

.login-demo-row:hover {
  border-color: rgba(0, 77, 67, 0.45);
  background: var(--primary-soft);
  box-shadow: var(--shadow-sm);
}

.login-demo-row strong {
  font-size: 0.82rem;
  font-weight: 750;
}

.login-demo-row code {
  font-size: 0.75rem;
  background: var(--bg-subtle);
  padding: 0.15rem 0.4rem;
  border-radius: 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.login-demo-pass {
  color: var(--muted);
  font-size: 0.72rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  white-space: nowrap;
}

@media (max-width: 520px) {
  .login-demo-row {
    grid-template-columns: 1fr;
    gap: 0.2rem;
  }
}

.error {
  color: var(--error);
  background: var(--error-soft);
  padding: 10px 12px;
  border-radius: var(--radius-sm);
}

.eyebrow,
.hero-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--primary);
  margin: 0 0 8px;
}

.hero-band {
  margin: 8px 0 24px;
}

.hero-band-inner {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  box-shadow: var(--shadow-sm);
}

.hero-copy h1 {
  margin: 0 0 8px;
  font-size: 1.75rem;
  letter-spacing: -0.02em;
}

.hero-lead {
  margin: 0;
  color: var(--muted);
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.tab {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  padding: 10px 16px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.9rem;
}

.tab.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 20px 22px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}

.panel h2 {
  margin: 0 0 6px;
  font-size: 1.2rem;
}

.section-hint,
.panel-lead {
  color: var(--muted);
  margin: 0 0 12px;
}

.filters-grid,
.admin-form {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px 14px;
  margin-top: 12px;
  /* Prevent long option text from expanding the panel / page */
  overflow: hidden;
}

.admin-form .full,
.filters-grid .full {
  grid-column: 1 / -1;
}

.filters-actions {
  display: flex;
  align-items: end;
  gap: 10px;
  grid-column: 1 / -1;
}

.btn-ghost {
  border: 1px solid var(--line);
  background: transparent;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-weight: 500;
}

.btn-danger {
  border: none;
  background: var(--error-soft);
  color: var(--error);
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
}

/* Results shell: meta/empty above a dense tile grid (no mixed grid children) */
.corpus-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  min-width: 0;
}

.list-meta {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.4;
}

/* List pagination (members + corpus tabs) */
.pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  margin-top: 1rem;
  padding: 0.75rem 0.15rem 0.25rem;
  border-top: 1px solid var(--line);
}

.pager-meta {
  margin: 0;
  font-size: 0.88rem;
}

.pager-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.pager-indicator {
  font-size: 0.88rem;
  color: var(--muted);
  min-width: 6.5rem;
  text-align: center;
}

.pager-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.card-list {
  display: grid;
  gap: 12px;
}

.card-list--grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  align-content: start;
}

/* Full-width empty/status rows if ever nested inside the grid */
.card-list--grid > p,
.card-list--grid > .empty-state,
.card-list--grid > .list-meta {
  grid-column: 1 / -1;
}

.card-list--admin {
  grid-template-columns: 1fr;
  gap: 0.45rem;
  align-content: start;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  box-shadow: var(--shadow-sm);
}

.card-click {
  cursor: pointer;
  transition: border-color var(--transition), box-shadow var(--transition),
    transform var(--transition);
}

.card-click:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
}

.card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.card-head h3 {
  margin: 0;
  font-size: 1.05rem;
}

.card-meta {
  color: var(--muted);
  font-size: 0.88rem;
  margin: 6px 0;
  overflow-wrap: anywhere;
}

.card-body {
  margin: 8px 0;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

/* —— Shared tab chrome (horizontal, dense) —— */
.tab-shell {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding-bottom: 1.5rem;
}

.tab-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1.05rem !important;
  margin-bottom: 0 !important;
  box-shadow: none !important;
}

.tab-toolbar h2 {
  margin: 0 !important;
  font-size: 1.15rem !important;
  text-transform: none !important;
  letter-spacing: -0.03em !important;
  color: var(--text) !important;
  font-weight: 800 !important;
}

.tab-toolbar .section-hint {
  margin: 0.25rem 0 0 !important;
  font-size: 0.92rem;
  line-height: 1.45;
  color: var(--muted);
}

.tab-eyebrow {
  margin: 0 0 0.2rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}

.tab-eyebrow--members,
.tab-eyebrow--profile,
.tab-eyebrow--tenders,
.tab-eyebrow--subsidies,
.tab-eyebrow--news,
.tab-eyebrow--users {
  color: var(--muted);
}

.tab-count {
  flex-shrink: 0;
  margin: 0;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 800;
  font-size: 0.85rem;
  font-variant-numeric: tabular-nums;
}

.chip-row--toolbar {
  margin: 0;
  justify-content: flex-end;
}

.filters-compact {
  margin-bottom: 0 !important;
  padding: 0.85rem 1rem !important;
}

.filters-compact .filters-grid {
  margin-top: 0;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.55rem 0.65rem;
}

.filters-compact .filters-actions {
  grid-column: span 2;
  align-items: end;
}

.filters-compact label {
  font-size: 0.78rem;
  gap: 4px;
}

.filters-compact input,
.filters-compact select {
  padding: 8px 10px;
  font-size: 0.88rem;
}

/* Collapsible filter panels (mobile folded by default) */
.filters-collapsible {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.filters-bar {
  display: flex;
  align-items: flex-end;
  gap: 0.5rem;
  min-width: 0;
}

.filters-bar-search {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0;
  font-size: 0.78rem;
  font-weight: 650;
  color: var(--muted);
}

.filters-bar-search-label {
  line-height: 1.2;
}

.filters-bar-search input {
  width: 100%;
  padding: 8px 10px;
  font-size: 0.88rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
}

.filters-toggle {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.5rem 0.8rem !important;
  font-size: 0.82rem !important;
  white-space: nowrap;
  align-self: flex-end;
}

.filters-toggle.has-active-filters {
  border-color: color-mix(in srgb, var(--primary) 55%, var(--line));
  color: var(--primary-strong);
  background: color-mix(in srgb, var(--primary-soft) 85%, #fff);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--primary) 28%, transparent);
  font-weight: 700;
}

.filters-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.15rem;
  height: 1.15rem;
  padding: 0 0.3rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1;
  color: #fff;
  background: var(--primary);
  font-variant-numeric: tabular-nums;
}

.filters-body {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  min-width: 0;
}

/* Whole filter panel when any value is set */
.filters-collapsible.has-active-filters {
  border-color: color-mix(in srgb, var(--primary) 42%, var(--line)) !important;
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--primary) 16%, transparent),
    var(--shadow-sm) !important;
  background:
    linear-gradient(
      180deg,
      color-mix(in srgb, var(--primary-soft) 55%, #fff) 0%,
      var(--surface) 2.75rem
    ) !important;
}

.filters-collapsible.has-active-filters .filters-bar-search input {
  border-color: color-mix(in srgb, var(--primary) 35%, var(--line));
}

/* Filled field chrome */
.filters-collapsible label.is-filter-active {
  color: var(--primary-strong);
  font-weight: 700;
}

.filters-collapsible label.is-filter-active input,
.filters-collapsible label.is-filter-active select {
  border-color: color-mix(in srgb, var(--primary) 50%, var(--line));
  background: color-mix(in srgb, var(--primary-soft) 45%, #fff);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--primary) 12%, transparent);
  font-weight: 650;
  color: var(--text);
}

/* Chip summary of active filters (visible when collapsed too) */
.filters-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.55rem;
  padding: 0.15rem 0.1rem 0.05rem;
}

.filters-summary[hidden] {
  display: none !important;
}

.filters-summary-label {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--primary-strong);
  flex-shrink: 0;
}

.filters-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  min-width: 0;
}

.filters-chip {
  display: inline-flex;
  align-items: baseline;
  gap: 0.28rem;
  max-width: 100%;
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--primary) 35%, var(--line));
  background: color-mix(in srgb, var(--primary-soft) 80%, #fff);
  font-size: 0.78rem;
  line-height: 1.25;
  color: var(--text);
}

.filters-chip-key {
  font-weight: 700;
  color: var(--primary-strong);
  flex-shrink: 0;
}

.filters-chip-key::after {
  content: "·";
  margin-left: 0.2rem;
  color: color-mix(in srgb, var(--primary) 45%, var(--muted));
  font-weight: 600;
}

.filters-chip-val {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
}

/* Desktop: always show advanced filters; keep search + fields in one block */
@media (min-width: 901px) {
  .filters-collapsible .filters-toggle {
    display: none;
  }

  .filters-collapsible .filters-body,
  .filters-collapsible .filters-body[hidden] {
    display: flex !important;
  }

  .filters-collapsible .filters-bar {
    /* search sits above the grid like before */
    margin-bottom: 0.15rem;
  }

  .filters-collapsible.is-collapsed .filters-body {
    display: flex !important;
  }
}

/* Mobile: fold advanced filters by default (search stays visible) */
@media (max-width: 900px) {
  .filters-collapsible {
    gap: 0.5rem;
  }

  .filters-collapsible .filters-bar {
    align-items: stretch;
  }

  .filters-collapsible .filters-bar-search {
    justify-content: center;
  }

  .filters-collapsible .filters-toggle {
    align-self: stretch;
    min-height: 2.55rem;
  }

  .filters-collapsible.is-collapsed .filters-body,
  .filters-collapsible.is-collapsed .filters-body[hidden] {
    display: none !important;
  }

  .filters-collapsible:not(.is-collapsed) .filters-body[hidden] {
    display: flex !important;
  }

  .filters-collapsible .filters-grid {
    grid-template-columns: 1fr 1fr;
  }

  .filters-collapsible .filters-actions {
    grid-column: 1 / -1;
  }

  .tickets-list-filters.filters-collapsible .tickets-filters-meta {
    margin-top: 0.35rem;
  }
}

/* Members: grid only (detail opens in full-window dialog) */
.members-workspace {
  display: block;
}

/* Agent search: horizontal bar */
.agent-bar {
  margin-bottom: 0 !important;
  padding: 1rem 1.1rem !important;
  background:
    linear-gradient(135deg, rgba(0, 77, 67, 0.06), transparent 55%),
    var(--surface) !important;
  border-color: rgba(0, 77, 67, 0.18) !important;
  box-shadow:
    0 1px 0 rgba(0, 77, 67, 0.06),
    var(--shadow-sm) !important;
}

.agent-search-inline {
  display: grid !important;
  grid-template-columns: 1fr auto;
  gap: 0.85rem 1.15rem;
  align-items: end;
  margin-top: 0 !important;
}

.agent-search-label {
  display: grid;
  gap: 0.45rem;
  min-width: 0;
}

.agent-search-label-text {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.8rem;
  font-weight: 650;
  color: var(--text);
  letter-spacing: -0.01em;
}

.agent-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.22rem;
  padding: 0.22rem 0.55rem 0.22rem 0.42rem;
  border-radius: 999px;
  background: var(--brand-lime);
  color: var(--brand-lime-ink);
  border: 1px solid #5a7020;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  line-height: 1.15;
  box-shadow: 0 1px 2px rgba(18, 33, 27, 0.12);
}

.agent-badge svg {
  flex-shrink: 0;
}

.agent-field {
  position: relative;
  min-width: 0;
}

.agent-search-inline textarea {
  display: block;
  width: 100%;
  min-height: 64px !important;
  padding: 0.7rem 0.9rem !important;
  border: 1px solid var(--line) !important;
  border-radius: 14px !important;
  background: rgba(255, 255, 255, 0.92) !important;
  box-shadow: inset 0 1px 2px rgba(18, 33, 27, 0.03);
  font-size: 0.92rem !important;
  line-height: 1.45 !important;
  resize: vertical;
  transition:
    border-color var(--transition),
    box-shadow var(--transition),
    background var(--transition),
    opacity var(--transition);
}

.agent-search-inline textarea::placeholder {
  color: #9aa1b8;
}

.agent-search-inline textarea:hover:not(:disabled) {
  border-color: var(--border-strong) !important;
}

.agent-search-inline textarea:focus {
  outline: none;
  border-color: var(--primary) !important;
  background: #fff !important;
  box-shadow:
    var(--focus-ring),
    inset 0 1px 2px rgba(18, 33, 27, 0.02);
}

.agent-search-inline textarea:disabled {
  cursor: not-allowed;
  opacity: 0.72;
  color: var(--muted);
  background: var(--bg-subtle) !important;
  border-color: var(--line) !important;
  box-shadow: none;
  resize: none;
}

.agent-field-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: rgba(247, 248, 252, 0.72);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  pointer-events: none;
  color: var(--primary);
}

.agent-field-overlay[hidden] {
  display: none !important;
}

.agent-field--loading textarea {
  border-color: rgba(0, 77, 67, 0.28) !important;
}

.agent-search-actions {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  min-width: 11.5rem;
  align-items: stretch;
}

/* Linked Search / Reset control */
.agent-btn-group {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-radius: 14px;
  overflow: hidden;
  box-shadow:
    0 1px 2px rgba(18, 33, 27, 0.05),
    0 6px 18px rgba(0, 77, 67, 0.12);
  border: 1px solid rgba(0, 77, 67, 0.22);
}

.agent-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  width: 100%;
  margin: 0;
  padding: 0.68rem 1rem;
  border: 0;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition:
    background var(--transition),
    color var(--transition),
    opacity var(--transition);
}

.agent-btn-icon {
  flex-shrink: 0;
  opacity: 0.92;
}

.agent-btn--search {
  background: var(--primary);
  color: #ffffff;
  border: 1px solid var(--primary-strong);
  box-shadow: 0 1px 2px rgba(0, 56, 48, 0.18);
  font-family: var(--font-semibold);
  font-weight: 650;
}

.agent-btn--search:hover:not(:disabled) {
  background: var(--brand-lime-hover);
  border-color: var(--brand-lime-hover);
}

.agent-btn--search:active:not(:disabled) {
  background: var(--brand-lime-hover);
}

.agent-btn--search:disabled {
  opacity: 0.48;
  cursor: not-allowed;
  box-shadow: none;
}

.agent-btn--stop {
  background: linear-gradient(180deg, #c2410c 0%, #b54708 100%);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.agent-btn--stop:hover {
  background: linear-gradient(180deg, #b54708 0%, #9a3906 100%);
}

.agent-btn--stop:active {
  background: #9a3906;
}

.agent-btn--stop:focus-visible {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    0 0 0 3px rgba(181, 71, 8, 0.28);
}

.agent-btn--reset {
  background: rgba(255, 255, 255, 0.94);
  color: var(--muted);
  border-top: 1px solid rgba(0, 77, 67, 0.14);
  font-weight: 650;
}

.agent-btn--reset:hover {
  background: var(--primary-soft);
  color: var(--primary);
}

.agent-btn--reset:active {
  background: #e8e9ff;
}

.agent-btn:focus-visible {
  outline: none;
  z-index: 1;
  box-shadow: var(--focus-ring);
}

.agent-btn--search:focus-visible {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    var(--focus-ring);
}

.agent-status {
  margin: 0;
  font-size: 0.74rem;
  max-width: 12rem;
  line-height: 1.35;
  text-align: center;
}

.agent-status:not([hidden]) {
  padding: 0.2rem 0.35rem;
  border-radius: 8px;
  background: var(--error-soft);
  color: var(--error);
  font-weight: 600;
}

.agent-spinner {
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  border: 2.5px solid rgba(0, 77, 67, 0.22);
  border-top-color: var(--primary);
  animation: agent-spin 0.7s linear infinite;
}

@keyframes agent-spin {
  to {
    transform: rotate(360deg);
  }
}

.agent-answer {
  margin-top: 0.85rem;
  padding: 0.95rem 1.05rem;
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(0, 77, 67, 0.05), transparent 40%),
    var(--bg-subtle);
  border: 1px solid rgba(0, 77, 67, 0.16);
}

.agent-answer h3 {
  margin: 0 0 0.45rem;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--primary);
  font-weight: 750;
}

.agent-answer .news-answer-body {
  max-height: 12rem;
  overflow: auto;
  font-size: 0.9rem;
  line-height: 1.55;
}

/* Compact result tiles */
.tile {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.85rem;
  align-items: start;
  padding: 0.9rem 1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: none;
  min-width: 0;
  transition: border-color 120ms ease, background 120ms ease;
}

.tile--member {
  grid-template-columns: auto 1fr;
}

.tile.card-click:hover,
.tile:hover {
  border-color: var(--border-strong);
  background: #eef0eb;
  box-shadow: none;
  transform: none;
}

.tile-mono {
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--primary);
  background: var(--primary-soft);
  letter-spacing: -0.02em;
  flex-shrink: 0;
}

.tile-logo {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: #fff;
  border: 1px solid var(--border);
  flex-shrink: 0;
  overflow: hidden;
  padding: 0.2rem;
}

.tile-logo img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

.fiche-avatar--logo {
  background: #fff;
  border: 1px solid var(--border);
  padding: 0.35rem;
  overflow: hidden;
}

.fiche-avatar--logo img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

.member-logo-preview-box {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 4.5rem;
  max-width: 16rem;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
}

.member-logo-preview-box img {
  max-width: 100%;
  max-height: 4.5rem;
  width: auto;
  height: auto;
  object-fit: contain;
}

.tile-mono--lg {
  width: 2.6rem;
  height: 2.6rem;
  font-size: 0.75rem;
}

.tile-side {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  min-width: 3.25rem;
  padding-top: 0.1rem;
}

.tile-day {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  background: transparent;
  min-width: 0;
  height: auto;
  border-radius: 0;
  display: block;
  place-items: unset;
}

.tile-day.is-critical {
  color: #b42318;
  background: transparent;
}

.tile-day.is-soon {
  color: #b54708;
  background: transparent;
}

.tile-day.is-mid {
  color: var(--text);
  background: transparent;
}

.tile-day.is-closed {
  color: #5b21b6;
  background: transparent;
}

.tile-signal {
  display: none;
}

.tile-signal.is-weak {
  display: none;
}

.tile-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.tile-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
}

.tile-head h3,
.tile-title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 750;
  letter-spacing: -0.02em;
  line-height: 1.3;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tile-meta {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 500;
  line-height: 1.4;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tile-snippet {
  margin: 0.15rem 0 0;
  font-size: 0.84rem;
  line-height: 1.4;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tile-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.65rem;
  margin-top: 0.25rem;
}

.tile-foot .tag-row {
  margin-top: 0;
}

.tile-link {
  margin-left: auto;
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
}

.tile-actors {
  font-size: 0.75rem;
  color: var(--muted);
}

.tile-details {
  margin: 0.2rem 0 0;
  font-size: 0.82rem;
  color: var(--muted);
}

.tile-details summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--text);
  font-size: 0.8rem;
}

.empty-state {
  grid-column: 1 / -1;
  margin: 0;
  padding: 1.5rem;
  text-align: center;
  color: var(--muted);
  background: var(--surface);
  border: 1px dashed var(--line);
  border-radius: var(--radius-md);
  font-weight: 600;
}

/* Animateur corpus: Consulter (portail-like) vs Gérer (CRUD) */
.app-shell--admin .app-stage > .tab-panel[data-admin-corpus-tab] {
  /* modebar + active view fill the stage */
  gap: 0;
}

.admin-corpus-modebar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 1rem;
  flex: 0 0 auto;
  margin: 0;
  padding: 0.7rem 1rem;
  border-radius: 0;
  border-left: 0;
  border-right: 0;
  border-top: 0;
}

.admin-corpus-modebar-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted, #64748b);
}

.admin-corpus-modebar-hint {
  flex: 1 1 14rem;
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.35;
}

.admin-corpus-modebar-hint strong {
  font-weight: 600;
  color: var(--ink, #0f172a);
}

.admin-corpus-view {
  flex: 1;
  min-height: 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.admin-corpus-view.hidden,
.admin-corpus-view[hidden] {
  display: none !important;
}

/* Consult: same padded scroll stage as other portal-like admin shells */
.app-shell--admin .app-stage > .tab-panel:not(.hidden) > .admin-corpus-view[data-admin-corpus-view="consult"] {
  padding: 0.85rem 1.5rem 2.5rem;
  overflow: auto;
}

.admin-corpus-view[data-admin-corpus-view="consult"] .tab-shell {
  gap: 0.85rem;
}

/* Manage: workspace must stretch under the modebar (was direct child of tab-panel) */
.admin-corpus-view[data-admin-corpus-view="manage"] > .admin-workspace {
  flex: 1;
  min-height: 0;
  height: auto;
}

/* Admin Sage-style: list left, record right (form folded by default) */
.admin-workspace {
  display: grid;
  grid-template-columns: minmax(280px, 38%) minmax(340px, 1fr);
  gap: 0;
  align-items: stretch;
  flex: 1;
  min-height: 0;
  height: 100%;
  background: #eef0f6;
  border-top: 1px solid var(--line);
  transition: grid-template-columns 0.2s ease;
}

/* List-first: form panel folded — list spans the full stage width */
.admin-workspace.is-form-collapsed {
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
}

.admin-workspace.is-form-collapsed .admin-list-panel {
  border-right: 0;
  width: 100%;
  max-width: none;
  grid-column: 1 / -1;
  grid-row: 1 / -1;
}

.admin-workspace.is-form-collapsed .admin-record-panel {
  display: none !important;
}

.admin-workspace.is-form-collapsed .admin-list-head,
.admin-workspace.is-form-collapsed .admin-list-filters,
.admin-workspace.is-form-collapsed .admin-list-body {
  width: 100%;
  max-width: none;
}

@media (prefers-reduced-motion: reduce) {
  .admin-workspace {
    transition: none;
  }
}

.admin-list-panel {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  border-right: 1px solid var(--line);
  background:
    linear-gradient(180deg, #eef0eb 0%, #f3f4fa 100%);
}

.admin-list-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem 1.05rem 0.85rem;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  flex-shrink: 0;
}

.admin-list-head-text {
  min-width: 0;
}

.admin-list-head h2 {
  margin: 0.15rem 0 0 !important;
  font-size: 1.15rem !important;
  font-weight: 800 !important;
  letter-spacing: -0.035em !important;
  text-transform: none !important;
  color: var(--text) !important;
}

.admin-list-count {
  margin: 0.25rem 0 0;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--muted);
}

.admin-list-new {
  flex-shrink: 0;
  padding: 0.45rem 0.85rem !important;
  font-size: 0.82rem !important;
}

/* Left-column filters — advanced grid folded by default */
.admin-list-filters {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 0.75rem 0.9rem 0.7rem;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
}

.admin-filter-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}

.admin-filter-bar .admin-filter-search {
  flex: 1 1 auto;
  min-width: 0;
}

.admin-filter-bar-spacer {
  flex: 1 1 auto;
}

.admin-filter-toggle {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.75rem !important;
  font-size: 0.8rem !important;
  white-space: nowrap;
}

.admin-filter-toggle.has-active-filters {
  border-color: color-mix(in srgb, var(--primary) 45%, var(--line));
  color: var(--primary);
  background: color-mix(in srgb, var(--primary-soft) 70%, #fff);
}

.admin-filter-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.15rem;
  height: 1.15rem;
  padding: 0 0.3rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1;
  color: #fff;
  background: var(--primary);
  font-variant-numeric: tabular-nums;
}

.admin-filter-panel {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.admin-list-filters.is-collapsed .admin-filter-panel {
  display: none;
}

.admin-filter-search input {
  width: 100%;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  font-size: 0.86rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.admin-filter-search input:focus {
  outline: none;
  border-color: color-mix(in srgb, var(--primary) 55%, var(--line));
  box-shadow: var(--focus-ring);
}

.admin-filter-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem 0.5rem;
}

.admin-workspace.is-form-collapsed .admin-filter-grid {
  grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr));
}

.admin-filter-grid label {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.admin-filter-grid select,
.admin-filter-grid input[type="date"] {
  width: 100%;
  padding: 0.4rem 0.5rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
  min-width: 0;
  font-family: inherit;
}

.admin-filter-grid input[type="date"]:focus {
  outline: none;
  border-color: color-mix(in srgb, var(--primary) 55%, var(--line));
  box-shadow: var(--focus-ring);
}

.admin-filter-reset {
  align-self: flex-start;
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.15rem 0;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.admin-filter-reset:hover {
  color: var(--primary-hover);
}

.admin-list-body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 0.35rem 0.45rem 1rem;
  gap: 0.3rem !important;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  align-content: start;
  justify-content: flex-start;
}

.admin-list-body .empty-state {
  margin: 0.65rem 0.35rem;
  border-radius: 12px;
  border-style: dashed;
  background: rgba(255, 255, 255, 0.7);
}

.admin-form-panel,
.admin-record-panel {
  position: relative;
  top: auto;
  margin: 0 !important;
  max-height: none;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  background: var(--surface);
}

.admin-record-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.85rem;
  padding: 1rem 1.25rem 0.9rem;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(180deg, #fbfbfe 0%, #ffffff 100%);
  flex-shrink: 0;
}

.admin-record-head-text,
.admin-record-head > div:first-child {
  min-width: 0;
  flex: 1 1 auto;
}

.admin-record-panel.is-editing .admin-record-head {
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--primary-soft) 55%, #fff) 0%, #fff 100%);
  box-shadow: none;
  border-bottom-color: color-mix(in srgb, var(--primary) 28%, var(--line));
}

.admin-form-panel h2,
.admin-record-head h2 {
  margin: 0.12rem 0 0 !important;
  font-size: 1.18rem !important;
  text-transform: none !important;
  letter-spacing: -0.035em !important;
  color: var(--text) !important;
  font-weight: 800 !important;
  max-width: 36rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-record-actions {
  flex-shrink: 0;
  margin-top: 0;
}

.admin-form-panel .admin-form {
  margin: 0;
  padding: 0.85rem 1.25rem 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0;
  overflow: auto;
  flex: 1;
  min-height: 0;
  align-content: start;
  /* Override legacy auto-fill grid on .admin-form */
  grid-template-columns: none;
  background:
    radial-gradient(ellipse 80% 40% at 100% 0%, rgba(0, 77, 67, 0.04), transparent 55%),
    var(--surface);
}

.admin-form-section {
  padding: 1rem 0 1.15rem;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 85%, transparent);
}

.admin-form-section:last-child {
  border-bottom: 0;
  padding-bottom: 0.35rem;
}

.admin-form-section-title {
  margin: 0 0 0.75rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.admin-form-callout {
  margin: 0 0 1rem;
  padding: 0.85rem 1rem;
  border: 1px solid color-mix(in srgb, var(--primary) 22%, var(--line));
  border-radius: var(--radius-sm);
  background:
    linear-gradient(
      135deg,
      color-mix(in srgb, var(--primary-soft) 70%, #fff) 0%,
      color-mix(in srgb, var(--brand-lime) 12%, #fff) 100%
    );
  color: var(--text);
}

.admin-form-callout-title {
  margin: 0 0 0.4rem;
  font-size: 0.88rem;
  font-weight: 750;
  letter-spacing: -0.015em;
  color: var(--primary-strong);
}

.admin-form-callout p {
  margin: 0 0 0.55rem;
  font-size: 0.84rem;
  line-height: 1.5;
  color: color-mix(in srgb, var(--text) 88%, var(--muted));
}

.admin-form-callout p:last-child {
  margin-bottom: 0;
}

.admin-form-callout-list {
  margin: 0;
  padding: 0 0 0 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.82rem;
  line-height: 1.45;
  color: color-mix(in srgb, var(--text) 90%, var(--muted));
}

.admin-form-callout-list li::marker {
  color: var(--primary);
}

.admin-list-hint {
  margin: 0.35rem 0 0;
  max-width: 42rem;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--muted);
}

.admin-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem 0.95rem;
  align-content: start;
}

.admin-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
  font-size: inherit;
  font-weight: inherit;
  color: inherit;
  letter-spacing: normal;
  text-transform: none;
}

.admin-field--full {
  grid-column: 1 / -1;
}

.admin-field-label {
  font-size: 0.8rem;
  font-weight: 650;
  letter-spacing: -0.01em;
  color: color-mix(in srgb, var(--text) 88%, var(--muted));
  line-height: 1.25;
}

.admin-field-label abbr {
  color: var(--error, #b42318);
  text-decoration: none;
  font-weight: 800;
  margin-left: 0.12rem;
}

.admin-field-hint {
  font-size: 0.72rem;
  font-weight: 500;
  line-height: 1.35;
  color: var(--muted);
}

.admin-field--check {
  grid-column: 1 / -1;
  gap: 0.4rem;
  padding: 0.65rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: color-mix(in srgb, var(--primary-soft) 35%, #fff);
}

.admin-field-check {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.admin-field-check input[type="checkbox"] {
  width: 1.05rem;
  height: 1.05rem;
  margin: 0;
  accent-color: var(--primary);
  flex-shrink: 0;
}

.admin-field-check .admin-field-label {
  margin: 0;
  font-size: 0.88rem;
}

/* Linked company accounts on Adhérents record panel */
.admin-linked-accounts {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 0.35rem 0 0.75rem;
}

.admin-linked-account-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: color-mix(in srgb, var(--surface) 92%, var(--primary-soft));
}

.admin-linked-account-meta {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.admin-linked-account-meta strong {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text);
}

.admin-linked-account-meta span {
  font-size: 0.78rem;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-linked-account-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  flex-shrink: 0;
}

.admin-linked-accounts-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.25rem 0 0.65rem;
}

.admin-member-account-add {
  margin-top: 0.35rem;
  padding-top: 0.75rem;
  border-top: 1px dashed color-mix(in srgb, var(--line) 90%, transparent);
}

.admin-linked-accounts-submit {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
  margin-top: 0.15rem;
  padding: 0.85rem 0.9rem;
  border-radius: 14px;
  background: color-mix(in srgb, var(--primary-soft) 55%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--primary) 14%, var(--line));
}

.admin-linked-accounts-submit .btn-primary,
.admin-linked-accounts-submit .btn-secondary {
  width: auto;
  min-height: 2.35rem;
}

.admin-linked-accounts-submit .btn-primary {
  min-width: 10.5rem;
  padding: 0.68rem 1.35rem;
  font-size: 0.9rem;
}

.admin-linked-accounts-submit .btn-secondary {
  padding: 0.55rem 1rem;
}

.admin-form-panel .admin-form .full,
.admin-form-panel .admin-form button[type="submit"],
.admin-form-panel .admin-form .admin-form-actions,
.admin-form-panel .admin-form .check {
  grid-column: 1 / -1;
}

.admin-form-panel label,
.admin-form-panel .admin-field {
  font-size: 0.8rem;
  font-weight: 650;
  letter-spacing: -0.01em;
  gap: 0.35rem;
  color: color-mix(in srgb, var(--text) 88%, var(--muted));
}

.admin-form-panel input,
.admin-form-panel select,
.admin-form-panel textarea {
  padding: 0.55rem 0.7rem;
  font-size: 0.9rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}

.admin-form-panel textarea {
  min-height: 5.5rem;
  resize: vertical;
  line-height: 1.45;
}

.admin-form-panel input:focus,
.admin-form-panel select:focus,
.admin-form-panel textarea:focus {
  outline: none;
  border-color: color-mix(in srgb, var(--primary) 50%, var(--line));
  box-shadow: var(--focus-ring);
}

.admin-record-mode {
  margin: 0.2rem 0 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.admin-record-panel.is-editing .admin-record-mode {
  color: var(--primary);
}

.admin-record-close {
  margin-left: 0.15rem;
}

.admin-row {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 0.7rem;
  padding: 0.8rem 0.85rem;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: none;
  width: 100%;
  box-sizing: border-box;
  text-align: left;
}

.admin-row[data-edit-id] {
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease;
}

.admin-row[data-edit-id]:hover {
  background: #fff;
  border-color: color-mix(in srgb, var(--primary) 22%, var(--line));
  box-shadow: var(--shadow-sm);
}

.admin-row[data-edit-id]:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 1px;
}

.admin-row.is-selected {
  background: color-mix(in srgb, var(--primary-soft) 55%, #fff);
  border-color: color-mix(in srgb, var(--primary) 32%, var(--line));
  box-shadow: var(--shadow-sm);
}

.admin-row-avatar {
  flex-shrink: 0;
  width: 2.15rem;
  height: 2.15rem;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #fff;
  background: linear-gradient(145deg, #17b6a4, #004d43);
}

/* Logo avatars: neutral surface (override monogram teal gradient). */
.admin-row-avatar.admin-row-avatar--logo {
  background: #fff;
  color: inherit;
  border: 1px solid var(--border);
  padding: 0.15rem;
  overflow: hidden;
}

.admin-row-avatar.admin-row-avatar--logo img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

.admin-row-avatar--user {
  background: linear-gradient(145deg, #64748b, #0f172a);
}

.admin-row-titleline {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 0.45rem;
  width: 100%;
  max-width: 100%;
}

.admin-row-titleline .admin-status,
.admin-row-titleline .dash-mini-badge {
  margin-left: auto;
  flex-shrink: 0;
}

.admin-row-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.28rem;
  margin-top: 0.28rem;
}

.admin-chip {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 0.18rem 0.5rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.25;
  color: var(--primary-strong);
  background: var(--primary-soft);
  border: 1px solid color-mix(in srgb, var(--primary) 28%, transparent);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-chip--muted {
  color: var(--text);
  background: var(--bg-subtle);
  border-color: var(--border-strong);
  font-weight: 500;
}

.admin-engagement-summary {
  margin: 0 0 0.85rem;
}
.admin-engagement-card {
  padding: 0.65rem 0.8rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--bg-subtle, #f8fafc);
}
.admin-engagement-card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  margin-bottom: 0.35rem;
}
.admin-engagement-meta {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.4;
}

/* Engagement score chips (animateur Adhérents) */
.admin-chip.chip-danger {
  color: #9b1c1c;
  background: color-mix(in srgb, #ef4444 14%, white);
  border-color: color-mix(in srgb, #ef4444 28%, transparent);
}
.admin-chip.chip-warn {
  color: #92400e;
  background: color-mix(in srgb, #f59e0b 16%, white);
  border-color: color-mix(in srgb, #f59e0b 30%, transparent);
}
.admin-chip.chip-ok {
  color: #065f46;
  background: color-mix(in srgb, #10b981 14%, white);
  border-color: color-mix(in srgb, #10b981 28%, transparent);
}
.admin-chip.chip-neutral {
  color: var(--primary);
  background: var(--primary-soft);
  border-color: color-mix(in srgb, var(--primary) 18%, transparent);
}
.admin-chip.chip-muted {
  color: var(--muted);
  background: var(--bg-subtle);
  border-color: var(--line);
}

.admin-status {
  flex-shrink: 0;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.16rem 0.4rem;
  border-radius: 999px;
}

.admin-status--open {
  color: #0f766e;
  background: rgba(15, 118, 110, 0.1);
}

.admin-status--closed {
  color: var(--muted);
  background: var(--bg-subtle);
}

.admin-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
}

.admin-form-actions button[type="submit"] {
  min-width: 7.5rem;
}

.admin-record-actions {
  flex-shrink: 0;
  max-width: 100%;
}

/* Toolbar delete — same family as .btn-secondary, danger tint.
   Underline is drawn with ::after (text-decoration is ignored on <button>). */
.admin-record-actions .btn-danger {
  appearance: none;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.5rem 0.9rem;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--error, #b42318);
  font-size: 0.85rem;
  font-weight: 700;
  font-family: inherit;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: none;
  transition:
    color 0.12s ease,
    background 0.12s ease,
    border-color 0.12s ease,
    opacity 0.12s ease;
}

.admin-record-actions .btn-danger::after {
  content: "";
  position: absolute;
  left: 0.9rem;
  right: 0.9rem;
  bottom: 0.35rem;
  height: 1.5px;
  border-radius: 1px;
  background: currentColor;
  opacity: 0;
  transform: scaleX(0.6);
  transition: opacity 0.12s ease, transform 0.12s ease;
  pointer-events: none;
}

/* No record selected */
.admin-record-actions .btn-danger.is-inactive {
  opacity: 0.35;
  color: var(--muted);
  border-color: transparent;
  background: transparent;
  cursor: default;
}

.admin-record-actions .btn-danger.is-inactive::after {
  opacity: 0;
}

/* Record selected — quiet pill, underline only on hover */
.admin-record-actions .btn-danger.is-active,
.admin-record-actions .btn-danger:not(.is-inactive) {
  opacity: 1;
  color: var(--error, #b42318);
  border-color: color-mix(in srgb, var(--error) 28%, var(--line));
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.admin-record-actions .btn-danger.is-active:hover,
.admin-record-actions .btn-danger:not(.is-inactive):hover {
  color: var(--error, #b42318);
  border-color: color-mix(in srgb, var(--error) 55%, var(--line));
  background: var(--error-soft);
}

.admin-record-actions .btn-danger.is-active:hover::after,
.admin-record-actions .btn-danger:not(.is-inactive):hover::after {
  opacity: 1;
  transform: scaleX(1);
}

.admin-record-actions .btn-danger.is-active:focus-visible,
.admin-record-actions .btn-danger:not(.is-inactive):focus-visible {
  outline: 2px solid color-mix(in srgb, var(--error) 40%, transparent);
  outline-offset: 2px;
}

.admin-record-actions .btn-danger.is-busy {
  opacity: 0.55;
  pointer-events: none;
}

.admin-record-actions .btn-danger.is-busy::after {
  opacity: 0;
}

.admin-form input[readonly],
.admin-form textarea[readonly] {
  opacity: 0.75;
  cursor: not-allowed;
  background: color-mix(in srgb, var(--line) 35%, var(--surface));
}

/* Rail intérêts → Ma fiche shortcut (no hover chrome) */
.rail-aside--interests {
  cursor: pointer;
}

.rail-aside--interests:hover,
.rail-aside--interests:focus-visible {
  outline: none;
  background: transparent;
}

.rail-aside-hint {
  margin: 0.35rem 0 0;
  font-size: 0.72rem;
}

/* Carries .muted (a light-surface ink token) but sits on the dark rail, so it
   renders near-invisible. Scoped to .rail-aside to outrank the later .muted. */
.rail-aside .rail-aside-hint {
  color: rgba(238, 242, 239, 0.62) !important;
  opacity: 1 !important;
}

/* Ma fiche tab (company presentation + intérêts self-edit) — full stage width */
.profile-root {
  max-width: none;
  width: 100%;
}

.ma-fiche {
  display: grid;
  gap: 1rem;
  width: 100%;
}

.ma-fiche-card--interests {
  border-top: 3px solid color-mix(in srgb, var(--primary, #004d43) 55%, transparent);
}

/* Interest badge editor (Ma fiche) */
.interest-badge-editor {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.45rem;
  min-height: 2.75rem;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--line, #d8dee8);
  border-radius: 12px;
  background: var(--surface, #fff);
  cursor: text;
}

.interest-badge-editor:focus-within {
  border-color: color-mix(in srgb, var(--primary, #004d43) 55%, var(--line, #d8dee8));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary, #004d43) 18%, transparent);
}

.interest-badges {
  display: contents;
}

.interest-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  max-width: 100%;
  padding: 0.28rem 0.35rem 0.28rem 0.65rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.2;
  color: #004d43;
  background: color-mix(in srgb, #17b6a4 16%, #fff);
  border: 1px solid color-mix(in srgb, #17b6a4 28%, transparent);
}

.interest-badge-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 16rem;
}

.interest-badge-remove {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.25rem;
  height: 1.25rem;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: inherit;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0.7;
}

.interest-badge-remove:hover,
.interest-badge-remove:focus-visible {
  opacity: 1;
  background: color-mix(in srgb, #17b6a4 22%, transparent);
  outline: none;
}

.interest-badge-empty {
  font-size: 0.82rem;
  font-weight: 450;
}

.interest-badge-input {
  flex: 1 1 8rem;
  min-width: 8rem;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  background: transparent !important;
  padding: 0.35rem 0.15rem !important;
  font: inherit;
  font-weight: 450;
  color: inherit;
}

.interest-badge-input::placeholder {
  color: var(--muted, #8b93a7);
  opacity: 0.9;
}

.ma-fiche-meta kbd {
  font-family: inherit;
  font-size: 0.78em;
  font-weight: 650;
  padding: 0.08em 0.35em;
  border-radius: 4px;
  border: 1px solid var(--line, #d8dee8);
  background: color-mix(in srgb, var(--line, #d8dee8) 35%, var(--surface, #fff));
}

.ma-fiche-card {
  padding: 1.1rem 1.25rem 1.25rem;
  display: grid;
  gap: 0.85rem;
}

.ma-fiche-identity {
  display: grid;
  gap: 0.15rem;
}

.ma-fiche-name {
  font-size: 1.05rem;
  font-weight: 650;
}

.ma-fiche-meta {
  margin: 0;
  font-size: 0.875rem;
}

.ma-fiche-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem 1rem;
}

.ma-fiche-form label {
  display: grid;
  gap: 0.3rem;
  font-size: 0.82rem;
  font-weight: 550;
  color: var(--muted, #5b6472);
}

.ma-fiche-contact {
  margin: 0.75rem 0 0;
  padding: 0.85rem 1rem 1rem;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 10px;
  background: var(--surface-muted, #f8fafc);
}

.ma-fiche-contact legend {
  font-weight: 600;
  padding: 0 0.25rem;
}

.ma-fiche-contact-hint {
  margin: 0.25rem 0 0.75rem;
  font-size: 0.9rem;
  line-height: 1.4;
}

.ma-fiche-share {
  display: flex !important;
  flex-direction: row !important;
  align-items: flex-start;
  gap: 0.55rem;
  margin: 0.35rem 0 0.85rem;
  font-weight: 500;
  cursor: pointer;
}

.ma-fiche-share input[type="checkbox"] {
  margin-top: 0.2rem;
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
}

.ma-fiche-form label.full {
  grid-column: 1 / -1;
}

.ma-fiche-form input,
.ma-fiche-form textarea {
  font: inherit;
  font-weight: 450;
  color: inherit;
  border: 1px solid var(--line, #d8dee8);
  border-radius: 10px;
  padding: 0.55rem 0.7rem;
  background: var(--surface, #fff);
}

.ma-fiche-form textarea {
  resize: vertical;
  min-height: 5.5rem;
}

.ma-fiche-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  margin-top: 0.15rem;
}

.ma-fiche-status {
  margin: 0;
  font-size: 0.875rem;
}

.ma-fiche-status.ok {
  color: var(--ok, #0f7a45);
}

.ma-fiche-status.error {
  color: var(--danger, #b42318);
}

.ma-fiche-callout {
  margin: 0;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  background: color-mix(in srgb, var(--line) 40%, var(--surface));
}

.admin-presentation-hint {
  grid-column: 1 / -1;
  margin: 0.25rem 0 0;
  font-size: 0.82rem;
}

.admin-field-hint {
  display: block;
  margin-top: 0.3rem;
  font-size: 0.78rem;
  font-weight: 450;
}

.btn-row-action {
  width: 1.7rem;
  height: 1.7rem;
  padding: 0 !important;
  border-radius: 8px !important;
  font-size: 1rem !important;
  line-height: 1;
  opacity: 0.55;
  flex-shrink: 0;
}

.admin-row:hover .btn-row-action,
.admin-row.is-selected .btn-row-action {
  opacity: 1;
}

.btn-row-action-wide {
  padding: 4px 8px !important;
  font-size: 0.75rem !important;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.admin-row-main {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.28rem;
  text-align: left;
}

.admin-row-main strong {
  font-size: 0.98rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.3;
  color: var(--text);
  /* Allow 2 lines — Actualités titles are often long */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  white-space: normal;
  max-width: 100%;
}

.admin-row-main .tile-meta {
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 0.86rem;
  line-height: 1.4;
  color: var(--muted);
}

.admin-row-actions {
  display: flex;
  gap: 0.4rem;
  flex-shrink: 0;
  margin-left: auto;
}

.btn-secondary {
  border: 1px solid var(--line);
  background: var(--primary-soft);
  color: var(--primary);
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
}

.btn-secondary:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary);
  white-space: nowrap;
}

.badge-open {
  background: #e8f8ef;
  color: #067647;
}

.badge-closed {
  background: var(--bg-subtle);
  color: var(--muted);
}

.badge-warn {
  background: var(--warn-soft);
  color: var(--warn);
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.tag {
  font-size: 0.75rem;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--bg-subtle);
  color: var(--muted);
  border: 1px solid var(--line);
  max-width: min(100%, 32ch);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}

.chip {
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
}

.chip.active {
  background: var(--primary-soft);
  border-color: var(--primary);
  color: var(--primary);
}

.detail-panel {
  margin: 0 0 16px;
  position: sticky;
  top: 12px;
  z-index: 2;
  max-height: min(70vh, 640px);
  overflow: auto;
}

.detail-panel h3 {
  margin: 16px 0 6px;
  font-size: 0.95rem;
}

.topbar-link {
  background: none;
  border: none;
  color: var(--muted);
  font-weight: 600;
  text-decoration: none;
  padding: 8px 10px;
}

.topbar-link:hover {
  color: var(--primary);
}

.muted {
  color: var(--muted);
}

.check {
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  gap: 8px !important;
}

details {
  margin: 10px 0;
  color: var(--muted);
  font-size: 0.9rem;
}

details summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--text);
}

/* News agent search (base; agent-bar overrides layout) */
.news-search-form {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.news-search-form label {
  display: grid;
  gap: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--muted);
}

.news-search-form textarea {
  width: 100%;
  min-height: 88px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  resize: vertical;
  line-height: 1.45;
}

.news-search-form textarea:focus {
  outline: none;
  box-shadow: var(--focus-ring);
  border-color: var(--primary);
}

.news-search-form .agent-btn--search:disabled,
.news-search-form button[type="submit"]:disabled {
  opacity: 0.48;
  cursor: not-allowed;
}

.news-answer {
  margin-top: 16px;
  padding: 16px 18px;
  border-radius: var(--radius-md);
  background: var(--primary-soft);
  border: 1px solid rgba(0, 77, 67, 0.2);
}

.news-answer h3 {
  margin: 0 0 10px;
  font-size: 1rem;
}

.news-answer-body {
  color: var(--text);
  line-height: 1.55;
  font-size: 0.95rem;
}

.news-answer-body p {
  margin: 0 0 10px;
}

.news-answer-body ul {
  margin: 0 0 10px;
  padding-left: 1.2rem;
}

.news-answer-body li {
  margin-bottom: 4px;
}

/* —— Accueil dashboard (professional) —— */
.dashboard {
  --dash-critical: #b42318;
  --dash-soon: #b54708;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding-bottom: 2rem;
}

/* Hero — quiet, no decoration */
.dash-hero {
  display: block;
  padding: 0.15rem 0 0.25rem;
  border: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
  position: static;
}

.dash-hero::after {
  display: none;
}

.dash-hero-copy {
  max-width: 48rem;
}

.dash-eyebrow {
  margin: 0 0 0.4rem;
  font-size: 0.7rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.dash-hero-line {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.65rem 1.25rem;
  margin-bottom: 0.4rem;
}

.dash-title {
  margin: 0;
  font-size: clamp(1.45rem, 2.2vw, 1.75rem);
  font-weight: 750;
  letter-spacing: -0.035em;
  line-height: 1.15;
  color: var(--text);
}

.dash-lede {
  margin: 0;
  max-width: 40rem;
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--muted);
}

.dash-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.dash-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
  box-shadow: none;
}

.dash-pill--muted {
  background: var(--bg-subtle);
}

.dash-pill--member {
  color: var(--text);
  border-color: var(--border-strong);
}

.dash-pill--warn {
  background: var(--warn-soft);
  border-color: transparent;
  color: var(--warn);
}

.dash-pill--ok {
  background: #ecfdf3;
  border-color: transparent;
  color: #067647;
}

/* Metrics — instrument strip (hairline cells, not elevated floating cards) */
.dash-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  overflow: hidden;
}

.dash-metrics--admin {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.dash-metric {
  appearance: none;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
  text-align: left;
  padding: 0.95rem 1rem;
  min-height: 0;
  border-radius: 0;
  border: 0;
  border-right: 1px solid var(--line);
  background: transparent;
  box-shadow: none;
  cursor: pointer;
  font: inherit;
  color: inherit;
  transition: background 120ms ease, color 120ms ease;
}

.dash-metric:last-child {
  border-right: 0;
}

.dash-metric:hover {
  border-color: transparent;
  background: color-mix(in srgb, var(--primary) 5%, var(--surface));
  transform: none;
  box-shadow: none;
}

.dash-metric:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--primary) 45%, transparent);
  z-index: 1;
}

.dash-metric-label {
  order: 0;
  margin: 0;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0;
}

.dash-metric-value {
  order: 1;
  font-size: 1.65rem;
  font-weight: 750;
  letter-spacing: -0.04em;
  line-height: 1.1;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.dash-metric-sub {
  order: 2;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--muted);
}

.dash-metric-hint {
  order: 3;
  margin-top: 0.35rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--primary);
  opacity: 0;
  transition: opacity 120ms ease;
}

.dash-metric:hover .dash-metric-hint {
  opacity: 1;
}

/* Deadlines — open section (hairline table), not equal elevated card */
.dash-section {
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0;
  overflow: visible;
  box-shadow: none;
}

.dash-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.35rem 0 0.85rem;
  border-bottom: 1px solid var(--line);
  background: transparent;
}

.dash-section-title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}

.dash-section-hint {
  margin: 0.2rem 0 0;
  font-size: 0.8rem;
  color: var(--muted);
}

.dash-section-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem;
}

.dash-text-btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--primary);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 650;
  padding: 0.35rem 0.55rem;
  border-radius: 6px;
  cursor: pointer;
}

.dash-text-btn:hover {
  background: var(--primary-soft);
}

.dash-deadline-table {
  display: flex;
  flex-direction: column;
}

.dash-deadline-head {
  display: grid;
  grid-template-columns: 5.5rem 6.5rem minmax(0, 1.6fr) minmax(0, 0.9fr) 4.5rem;
  gap: 0.75rem;
  padding: 0.55rem 0.15rem;
  font-size: 0.68rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  background: transparent;
  border-bottom: 1px solid var(--line);
}

.dash-deadline-row {
  appearance: none;
  display: grid;
  grid-template-columns: 5.5rem 6.5rem minmax(0, 1.6fr) minmax(0, 0.9fr) 4.5rem;
  gap: 0.75rem;
  align-items: center;
  width: 100%;
  text-align: left;
  padding: 0.7rem 0.15rem;
  border: 0;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 85%, transparent);
  background: transparent;
  cursor: pointer;
  font: inherit;
  color: inherit;
  transition: background 100ms ease;
}

.dash-deadline-row:last-child {
  border-bottom: 0;
}

.dash-deadline-row:hover {
  background: color-mix(in srgb, var(--primary) 4%, transparent);
}

.dash-deadline-row:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 2px rgba(0, 77, 67, 0.35);
}

.dd-date {
  font-size: 0.85rem;
  font-weight: 650;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.dd-type {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
}

.dd-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dd-org {
  font-size: 0.8rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dd-delay {
  font-size: 0.8rem;
  font-weight: 650;
  text-align: right;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}

.dash-deadline-row.is-critical .dd-delay {
  color: var(--dash-critical);
}

.dash-deadline-row.is-soon .dd-delay {
  color: var(--dash-soon);
}

/* Explore panels */
.dash-explore {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.dash-panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: none;
  overflow: hidden;
}

.dash-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 0.95rem;
  border-bottom: 1px solid var(--line);
  background: transparent;
}

.dash-panel-title {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.dash-panel-count {
  font-size: 0.72rem;
  font-weight: 650;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.1rem 0.45rem;
  font-variant-numeric: tabular-nums;
}

.dash-panel-cta {
  appearance: none;
  flex-shrink: 0;
  border: 0;
  background: transparent;
  color: var(--primary);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 650;
  padding: 0.3rem 0.4rem;
  border-radius: 6px;
  cursor: pointer;
}

.dash-panel-cta:hover {
  background: var(--primary-soft);
  color: var(--primary);
  border-color: transparent;
}

.dash-panel-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 0.2rem 0.35rem 0.35rem;
}

/* Quiet list rows */
.dash-row {
  appearance: none;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  text-align: left;
  padding: 0.6rem 0.6rem;
  border: 0;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
  font: inherit;
  color: inherit;
  transition: background 100ms ease;
}

.dash-row:hover {
  background: color-mix(in srgb, var(--primary) 4%, transparent);
}

.dash-row:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.dash-row-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  flex: 1;
}

.dash-row-title {
  font-size: 0.86rem;
  font-weight: 650;
  letter-spacing: -0.01em;
  line-height: 1.3;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.dash-row-meta {
  font-size: 0.75rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dash-row-trailing {
  flex-shrink: 0;
  font-size: 0.75rem;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  max-width: 7rem;
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dash-row-trailing.is-critical {
  color: var(--dash-critical);
}

.dash-row-trailing.is-soon {
  color: var(--dash-soon);
}

.dash-row-trailing.is-muted {
  font-weight: 500;
  color: var(--muted);
  max-width: 9rem;
}

.dash-flag {
  display: inline;
  font-size: 0.68rem;
  font-weight: 650;
  color: var(--warn);
  margin-left: 0.35rem;
}

.dash-empty {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.4rem;
  padding: 1rem 0.75rem;
  color: var(--muted);
  font-size: 0.85rem;
}

.dash-link {
  appearance: none;
  border: 0;
  background: none;
  color: var(--primary);
  font: inherit;
  font-weight: 650;
  font-size: 0.82rem;
  cursor: pointer;
  padding: 0;
  text-decoration: none;
}

.dash-link:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.dash-loading,
.dash-error-card {
  min-height: 12rem;
  display: grid;
  place-items: center;
}

.dash-loading-card {
  text-align: center;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.9rem;
}

.dash-loading-pulse {
  width: 1.75rem;
  height: 1.75rem;
  margin: 0 auto 0.75rem;
  border-radius: 50%;
  border: 2px solid var(--line);
  border-top-color: var(--primary);
  animation: dash-spin 0.7s linear infinite;
}

@keyframes dash-spin {
  to { transform: rotate(360deg); }
}

.dash-error-card {
  padding: 1.5rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface);
}

@media (max-width: 1100px) {
  .dash-metrics--admin {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .dash-deadline-head,
  .dash-deadline-row {
    grid-template-columns: 4.75rem 5.5rem minmax(0, 1fr) 4rem;
  }

  .dd-org,
  .dash-deadline-head span:nth-child(4) {
    display: none;
  }
}

@media (max-width: 1100px) {
  .filters-compact .filters-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .filters-compact .filters-actions {
    grid-column: span 1;
  }
}

@media (max-width: 900px) {
  .dash-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dash-metrics--admin {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dash-explore {
    grid-template-columns: 1fr;
  }

  .dash-section-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .dash-deadline-head {
    display: none;
  }

  .dash-deadline-row {
    grid-template-columns: 1fr auto;
    gap: 0.25rem 0.75rem;
  }

  .dd-date { grid-column: 1; }
  .dd-delay { grid-column: 2; grid-row: 1; }
  .dd-type { grid-column: 1; font-size: 0.72rem; }
  .dd-title { grid-column: 1 / -1; white-space: normal; -webkit-line-clamp: 2; display: -webkit-box; -webkit-box-orient: vertical; }
  .dd-org { display: none; }

  .card-list--grid {
    grid-template-columns: 1fr;
  }

  .admin-workspace {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(220px, 40vh) minmax(0, 1fr);
  }

  .admin-workspace.is-form-collapsed {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr);
  }

  .admin-list-panel {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .admin-workspace.is-form-collapsed .admin-list-panel {
    border-bottom: 0;
    width: 100%;
    max-width: none;
  }

  .admin-filter-grid {
    grid-template-columns: 1fr 1fr;
  }

  .admin-form-panel,
  .admin-record-panel {
    position: static;
    max-height: none;
  }

  .admin-form-grid {
    grid-template-columns: 1fr;
  }

  .admin-record-head {
    flex-direction: column;
    align-items: stretch;
  }

  .admin-record-actions {
    width: 100%;
  }

  .admin-record-actions button {
    flex: 1;
  }

  .admin-record-close {
    margin-left: 0;
  }

  .agent-search-inline {
    grid-template-columns: 1fr;
  }

  .agent-search-actions {
    min-width: 0;
    width: 100%;
  }

  .agent-btn-group {
    flex-direction: row;
    width: 100%;
  }

  /* Reset the desktop width:100% so the row layout sizes buttons by content */
  .agent-btn-group .agent-btn {
    width: auto;
  }

  .agent-btn--search {
    flex: 1 1 auto;
  }

  .agent-btn--reset {
    flex: 0 0 auto;
    border-top: 0;
    border-left: 1px solid rgba(0, 77, 67, 0.14);
  }

  .agent-status {
    max-width: none;
    text-align: left;
  }

  .tab-toolbar {
    flex-direction: column;
  }

  .chip-row--toolbar {
    justify-content: flex-start;
  }
}

@media (max-width: 700px) {
  .topbar {
    padding: 0 16px;
    height: auto;
    min-height: 64px;
    flex-wrap: wrap;
  }

  .hero-band-inner {
    padding: 20px;
  }

  .dash-metrics {
    grid-template-columns: 1fr 1fr;
  }

  .filters-compact .filters-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* —— Échanges (tickets) — clean list + focused thread —— */
.tab-eyebrow--tickets {
  color: var(--primary);
}

.btn-sm {
  padding: 0.4rem 0.75rem !important;
  font-size: 0.82rem !important;
}

/* Inbox filters */
.tickets-list-filters {
  margin: 0 0 0.75rem !important;
  padding: 0.75rem 0.9rem !important;
}

.tickets-filters-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.6rem 0.7rem;
  align-items: end;
}

.tickets-filter-field {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
  min-width: 0;
}

.tickets-filter-field--grow {
  grid-column: span 1;
}

.tickets-filter-field input,
.tickets-filter-field select {
  width: 100%;
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--text);
  font: inherit;
  font-size: 0.88rem;
  font-weight: 500;
}

.tickets-filter-field input:focus,
.tickets-filter-field select:focus {
  outline: none;
  box-shadow: var(--focus-ring);
  border-color: var(--primary);
}

.tickets-filters-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: 0.65rem;
  padding-top: 0.55rem;
  border-top: 1px solid var(--line);
}

.tickets-filters-meta .muted {
  margin: 0;
  font-size: 0.82rem;
}

@media (max-width: 1100px) {
  .tickets-filters-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .tickets-filter-field--grow {
    grid-column: span 3;
  }
}

@media (max-width: 640px) {
  .tickets-filters-grid {
    grid-template-columns: 1fr 1fr;
  }
  .tickets-filter-field--grow {
    grid-column: span 2;
  }
}

/* Inbox — single list panel, subject-first rows */
.tickets-inbox {
  display: flex;
  flex-direction: column;
  gap: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.tickets-inbox-empty {
  padding: 2rem 1.25rem;
  text-align: center;
  background: var(--surface);
}

.tickets-inbox-empty .empty-state {
  margin: 0 0 0.35rem;
  font-weight: 600;
  color: var(--text);
}

.tickets-inbox-empty .muted {
  margin: 0;
  font-size: 0.9rem;
}

.ticket-inbox-card {
  position: relative;
  display: flex;
  align-items: stretch;
  gap: 0;
  cursor: pointer;
  background: var(--surface);
  border: none;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  box-shadow: none;
  overflow: hidden;
  transition: background var(--transition);
}

.ticket-inbox-card:last-child {
  border-bottom: none;
}

.ticket-inbox-card:hover {
  background: var(--surface-2);
}

.ticket-inbox-card:focus-visible {
  outline: none;
  background: var(--primary-ghost);
  box-shadow: inset 0 0 0 2px var(--primary);
}

.ticket-inbox-card-accent {
  display: none;
}

.ticket-inbox-card-body {
  flex: 1;
  min-width: 0;
  padding: 0.85rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.ticket-inbox-card-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem 1rem;
}

.ticket-inbox-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
}

.ticket-kind-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.1rem 0.45rem;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.01em;
  background: var(--surface-2);
  color: var(--muted);
  border: 1px solid var(--line);
  white-space: nowrap;
}

.ticket-kind-chip--broadcast {
  background: var(--warn-soft);
  color: var(--warn);
  border-color: transparent;
}

.ticket-kind-chip--introduction {
  background: var(--success-soft);
  color: var(--success);
  border-color: transparent;
}

.ticket-kind-chip--peer {
  background: rgba(3, 105, 161, 0.1);
  color: #0369a1;
  border-color: transparent;
}

.ticket-kind-chip--support {
  background: var(--primary-soft);
  color: var(--primary-strong);
  border-color: transparent;
}

.ticket-inbox-date {
  flex-shrink: 0;
  font-size: 0.78rem;
  font-weight: 550;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.ticket-inbox-subject {
  margin: 0;
  font-family: var(--font);
  font-size: 0.98rem;
  font-weight: 650;
  letter-spacing: 0.005em;
  color: var(--text);
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  flex: 1 1 auto;
}

.ticket-inbox-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem 0.55rem;
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 500;
  line-height: 1.4;
}

.ticket-inbox-ref {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.72rem;
  font-weight: 550;
  color: var(--muted);
  opacity: 0.9;
}

.ticket-inbox-dot {
  opacity: 0.45;
}

.ticket-inbox-msgs {
  white-space: nowrap;
}

.ticket-inbox-people {
  margin: 0;
  font-size: 0.78rem;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  max-width: 100%;
}

.ticket-inbox-people::before {
  content: "·";
  margin-right: 0.55rem;
  opacity: 0.45;
}

.ticket-inbox-chevron {
  display: none;
}

.ticket-row {
  cursor: pointer;
}

.ticket-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.1rem 0.45rem;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  background: var(--surface-2);
  color: var(--muted);
  border: 1px solid var(--line);
  white-space: nowrap;
}

.ticket-badge--open {
  background: var(--success-soft);
  color: var(--success);
  border-color: transparent;
}

.ticket-badge--pending {
  background: var(--warn-soft);
  color: var(--warn);
  border-color: transparent;
}

.ticket-badge--closed {
  background: var(--surface-2);
  color: var(--muted);
  border-color: var(--line);
}

.ticket-badge--archived {
  background: transparent;
  color: var(--muted);
  border-color: var(--line);
}

.ticket-inbox-card.is-archived {
  opacity: 0.72;
}

.ticket-inbox-card.is-archived .ticket-inbox-subject {
  color: var(--muted);
  font-weight: 550;
}

.tickets-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  margin-left: auto;
}

/* —— Conversation room (detail) —— */
.tickets-detail {
  display: flex;
  flex-direction: column;
  min-height: min(78vh, 840px);
}

.ticket-room {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: min(78vh, 840px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: none;
  overflow: hidden;
}

.ticket-room-header {
  flex: 0 0 auto;
  padding: 0.75rem 1rem 0.85rem;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.ticket-room-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
}

.ticket-room-back {
  font-weight: 600 !important;
}

.ticket-room-titleblock {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.ticket-room-kicker {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.45rem;
  order: 2;
}

.ticket-room-ref {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.72rem;
  font-weight: 550;
  letter-spacing: 0.01em;
  color: var(--muted);
  padding: 0;
  border-radius: 0;
  background: transparent;
  border: none;
}

.ticket-room-subject {
  margin: 0;
  order: 1;
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 1.6vw, 1.3rem);
  font-weight: 400;
  letter-spacing: 0.01em;
  color: var(--text);
  line-height: 1.3;
}

.ticket-room-sub {
  margin: 0;
  order: 3;
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 500;
}

.ticket-room-meta {
  margin: 0;
  order: 4;
  font-size: 0.8rem;
}

.ticket-room.is-archived .ticket-room-header {
  background: var(--surface-2);
}

.ticket-room.is-closed .ticket-room-composer {
  display: none;
}

.ticket-room .ticket-participants {
  flex: 0 0 auto;
  margin: 0 !important;
  border-radius: 0 !important;
  border-left: none !important;
  border-right: none !important;
  border-top: none !important;
  box-shadow: none !important;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}

.ticket-room-stream {
  flex: 1 1 auto;
  min-height: 220px;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}

.ticket-thread {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  flex: 1;
  max-height: none;
  min-height: 240px;
  height: min(52vh, 520px);
  overflow: auto;
  padding: 1rem 1rem 1.15rem;
  scroll-behavior: smooth;
}

.ticket-thread-empty {
  margin: auto;
  text-align: center;
  padding: 2rem 1rem;
}

.ticket-day-sep {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin: 0.35rem 0 0.15rem;
}

.ticket-day-sep::before,
.ticket-day-sep::after {
  content: "";
  flex: 1 1 auto;
  max-width: 5rem;
  height: 1px;
  background: var(--line);
}

.ticket-day-sep span {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: none;
  color: var(--muted);
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
}

.ticket-msg {
  display: flex;
  align-items: flex-end;
  gap: 0.5rem;
  max-width: min(640px, 90%);
}

/* Alignment: based on current viewer (mine = right), not on role. */
.ticket-msg--theirs {
  align-self: flex-start;
  flex-direction: row;
}

.ticket-msg--mine {
  align-self: flex-end;
  flex-direction: row-reverse;
}

/* Legacy fallbacks if side class missing */
.ticket-msg--member:not(.ticket-msg--mine):not(.ticket-msg--theirs) {
  align-self: flex-start;
  flex-direction: row;
}

.ticket-msg--staff:not(.ticket-msg--mine):not(.ticket-msg--theirs) {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.ticket-msg-avatar {
  flex: 0 0 auto;
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 0.62rem;
  font-weight: 700;
  border: none;
  box-shadow: none;
}

.ticket-msg--member .ticket-msg-avatar {
  background: #e6e9e3;
  color: #3a433d;
}

.ticket-msg--staff .ticket-msg-avatar {
  background: var(--primary-soft);
  color: var(--primary-strong);
}

.ticket-msg-bubble {
  min-width: 0;
  padding: 0.55rem 0.75rem 0.6rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  box-shadow: none;
}

.ticket-msg--theirs .ticket-msg-bubble {
  border-bottom-left-radius: 4px;
}

.ticket-msg--mine .ticket-msg-bubble {
  border-bottom-right-radius: 4px;
}

.ticket-msg--member .ticket-msg-bubble {
  background: #fff;
}

.ticket-msg--staff .ticket-msg-bubble {
  background: #eaf5f1;
  border-color: rgba(0, 77, 67, 0.14);
}

/* Own messages: clear but quiet distinction */
.ticket-msg--mine.ticket-msg--member .ticket-msg-bubble {
  background: #f0f2ed;
  border-color: var(--line);
}

.ticket-msg--mine.ticket-msg--staff .ticket-msg-bubble {
  background: #d8ebe4;
  border-color: rgba(0, 77, 67, 0.16);
}

.ticket-msg-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.25rem 0.65rem;
  margin-bottom: 0.25rem;
}

.ticket-msg-author {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem;
  min-width: 0;
}

.ticket-msg-author strong {
  font-size: 0.84rem;
  font-weight: 650;
  color: var(--text);
}

.ticket-msg-subname {
  font-size: 0.74rem;
  font-weight: 500;
  color: var(--muted);
}

.ticket-msg-role {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-transform: none;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
}

.ticket-msg-role::before {
  content: "·";
  margin-right: 0.3rem;
  opacity: 0.5;
}

.ticket-msg-role--staff {
  color: var(--primary);
  background: transparent;
}

.ticket-msg-role--member {
  color: var(--muted);
  background: transparent;
}

.ticket-msg-time {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.ticket-msg-body {
  margin: 0;
  white-space: pre-wrap;
  line-height: 1.5;
  font-size: 0.93rem;
  color: var(--text);
  word-break: break-word;
}

.ticket-msg-objects {
  list-style: none;
  margin: 0.55rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.ticket-msg-object-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.1rem;
  width: 100%;
  text-align: left;
  padding: 0.55rem 0.7rem;
  border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--accent, #3b82f6) 35%, var(--line));
  background: color-mix(in srgb, var(--accent, #3b82f6) 8%, var(--surface));
  color: var(--text);
  cursor: pointer;
  font: inherit;
}

.ticket-msg-object-btn:hover:not(:disabled) {
  border-color: var(--accent, #3b82f6);
  background: color-mix(in srgb, var(--accent, #3b82f6) 14%, var(--surface));
}

.ticket-msg-object-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.ticket-msg-object-type {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent, #3b82f6);
}

.ticket-msg-object-title {
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.3;
}

.ticket-msg-object-meta {
  font-size: 0.78rem;
}

.ticket-msg-object.is-unavailable .ticket-msg-object-title {
  font-style: italic;
}

.ticket-share-attach {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin: 0.25rem 0 0.5rem;
}

.ticket-share-attach-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.ticket-share-attach-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
}

.ticket-share-chips {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.ticket-share-chips:empty {
  display: none;
}

.ticket-share-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  max-width: 100%;
  padding: 0.28rem 0.45rem 0.28rem 0.55rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface-2, var(--surface));
  font-size: 0.8rem;
}

.ticket-share-chip-type {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--accent, #3b82f6);
}

.ticket-share-chip-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 16rem;
}

.ticket-share-chip-remove {
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  padding: 0 0.15rem;
}

.ticket-share-chip-remove:hover {
  color: var(--danger, #b91c1c);
}

/* Staff share control — title-row only (never in .tile-foot next to Source). */
.btn-share {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
  z-index: 2;
  width: 1.75rem;
  height: 1.75rem;
  margin: 0;
  padding: 0;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  line-height: 0;
  cursor: pointer;
  pointer-events: auto;
  box-shadow: none;
  transition:
    color 0.12s ease,
    background 0.12s ease,
    border-color 0.12s ease;
}

.btn-share:hover {
  color: var(--primary, #0f766e);
  border-color: color-mix(in srgb, var(--primary, #0f766e) 40%, var(--line));
  background: color-mix(in srgb, var(--primary, #0f766e) 10%, var(--surface));
}

.btn-share:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.btn-share-icon {
  display: block;
  pointer-events: none;
}

.tile-share {
  position: static;
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  line-height: 0;
  z-index: 2;
}

.corpus-tile.is-share-highlight,
[data-object-id].is-share-highlight {
  outline: 2px solid var(--accent, #3b82f6);
  outline-offset: 2px;
  transition: outline-color 0.2s ease;
}

/* Focused single-object view (Échanges / favoris deep link) */
.corpus-focus-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  margin: 0 0 0.85rem;
  padding: 0.75rem 1rem;
  border: 1px solid color-mix(in srgb, var(--primary, #0f766e) 28%, var(--line));
  background: color-mix(in srgb, var(--primary, #0f766e) 8%, var(--surface));
  border-radius: 12px;
}

.corpus-focus-banner-text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.corpus-focus-banner-text strong {
  font-size: 0.9rem;
}

.corpus-focus-error {
  margin: 0 0 0.75rem;
}

.ticket-msg--staff .ticket-msg-bubble {
  position: relative;
}

/* Composer — inline send, quiet bar */
.ticket-room-composer {
  flex: 0 0 auto;
  margin: 0 !important;
  padding: 0.7rem 0.9rem 0.8rem !important;
  border-top: 1px solid var(--line);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  box-shadow: none;
}

.ticket-room-composer-as {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 550;
  color: var(--muted);
}

.ticket-room-composer-as:not([hidden]):empty {
  display: none;
}

.ticket-room-composer-row {
  display: flex;
  align-items: flex-end;
  gap: 0.55rem;
}

.ticket-room-composer-label {
  margin: 0 !important;
  flex: 1 1 auto;
  min-width: 0;
}

.ticket-room-composer textarea {
  min-height: 2.6rem;
  max-height: 10rem;
  resize: vertical;
  border-radius: var(--radius-sm) !important;
  padding: 0.6rem 0.75rem !important;
  background: #fff !important;
  border-color: var(--line) !important;
  box-shadow: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.ticket-room-composer textarea:focus {
  background: #fff !important;
  border-color: var(--primary) !important;
  box-shadow: var(--focus-ring) !important;
}

.ticket-room-composer-actions {
  display: flex;
  justify-content: flex-end;
  margin: 0 !important;
  flex: 0 0 auto;
}

.ticket-room-composer-actions button[type="submit"] {
  min-width: auto;
  border-radius: var(--radius-sm) !important;
  padding: 0.6rem 1.1rem !important;
  font-weight: 650 !important;
  box-shadow: none !important;
}

.tickets-reply-form,
.tickets-panel {
  margin-top: 8px;
}

.tickets-panel {
  padding: 1rem 1.1rem 1.15rem !important;
}

.tickets-panel h3 {
  margin: 0 0 0.35rem;
  font-size: 1.15rem;
  font-weight: 400;
}

.tickets-detail-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 12px 16px;
  margin-bottom: 12px;
}

.tickets-detail-head > div {
  flex: 1 1 200px;
}

@media (max-width: 720px) {
  .ticket-msg {
    max-width: 100%;
  }

  .ticket-thread {
    height: min(48vh, 420px);
    padding: 0.85rem 0.75rem 1rem;
  }

  .ticket-room-header {
    padding: 0.65rem 0.75rem 0.75rem;
  }

  .ticket-room-composer {
    padding: 0.6rem 0.7rem 0.75rem !important;
  }

  .ticket-room-composer-row {
    flex-direction: column;
    align-items: stretch;
  }

  .ticket-room-composer-actions {
    justify-content: stretch;
  }

  .ticket-room-composer-actions button[type="submit"] {
    width: 100%;
  }

  .ticket-inbox-card-body {
    padding: 0.75rem 0.85rem;
  }
}

/*
 * Desktop open thread: fit the conversation room into the remaining stage
 * height so the composer stays visible above the stage bottom inset.
 *
 * Without this, min-height: 78vh + tab toolbar + participants pushes the
 * composer past the fold (stage barely scrollable, bottom margin looks “missing”).
 * Thread becomes the only scroller; stage padding keeps a clear bottom margin.
 */
@media (min-width: 901px) {
  /* Portal stage is block+scroll; switch to flex fill while a thread is open. */
  body.has-app-shell .app-stage:has(.tickets-detail:not(.hidden)) {
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  body.has-app-shell .app-stage:has(.tickets-detail:not(.hidden)) > .tab-panel:not(.hidden) {
    flex: 1 1 auto;
    min-height: 0;
    height: 100%;
    max-height: 100%;
    display: flex;
    flex-direction: column;
  }

  .tab-shell--tickets:has(.tickets-detail:not(.hidden)) {
    flex: 1 1 auto;
    min-height: 0;
    height: 100%;
    max-height: 100%;
    /* Prefer thread-internal scroll; allow shell scroll only if header+composer exceed the fold. */
    overflow: auto;
  }

  /* Room already has Retour + actions — drop the tab chrome to free vertical space for the thread. */
  .tab-shell--tickets:has(.tickets-detail:not(.hidden)) > .tab-toolbar {
    display: none;
  }

  /* Admin stage already flexes children; prefer thread scroll, shell as fallback. */
  .app-shell--admin .app-stage > .tab-panel:not(.hidden) > .tab-shell--tickets:has(.tickets-detail:not(.hidden)) {
    overflow: auto;
  }

  .tab-shell--tickets:has(.tickets-detail:not(.hidden)) > .tickets-detail:not(.hidden) {
    flex: 1 1 auto;
    min-height: 0;
    height: auto;
    max-height: 100%;
  }

  .tab-shell--tickets:has(.tickets-detail:not(.hidden)) .ticket-room {
    flex: 1 1 auto;
    min-height: 0;
    height: 100%;
    max-height: 100%;
  }

  /* Large broadcast lists already scroll inside .ticket-participants--large;
     keep the stream flexible with a usable minimum. */
  .tab-shell--tickets:has(.tickets-detail:not(.hidden)) .ticket-room .ticket-participants {
    flex: 0 1 auto;
    min-height: 0;
  }

  .tab-shell--tickets:has(.tickets-detail:not(.hidden))
    .ticket-participants--large
    .ticket-participants-list {
    max-height: min(22vh, 180px);
  }

  .tab-shell--tickets:has(.tickets-detail:not(.hidden)) .ticket-room-stream {
    flex: 1 1 auto;
    min-height: 10rem;
  }

  .tab-shell--tickets:has(.tickets-detail:not(.hidden)) .ticket-thread {
    flex: 1 1 auto;
    min-height: 0;
    height: auto;
    max-height: none;
  }
}

/* Dedicated form layout — avoid .admin-form grid/overflow which can clip actions */
.tickets-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 12px;
  overflow: visible;
}

.tickets-form label.full {
  display: grid;
  gap: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--muted);
}

.tickets-form input,
.tickets-form textarea {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font: inherit;
}

/* Checkboxes/radios must not inherit the full-width text-field rules above
   (that centered the control and pushed labels off the right edge). */
.tickets-form input[type="checkbox"],
.tickets-form input[type="radio"] {
  width: auto;
  max-width: none;
  min-width: 1rem;
  min-height: 1rem;
  height: auto;
  padding: 0;
  margin: 0.15rem 0 0;
  border: initial;
  border-radius: initial;
  background: initial;
  flex: 0 0 auto;
  align-self: flex-start;
  accent-color: var(--primary);
}

.tickets-form input:focus,
.tickets-form textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: var(--focus-ring);
}

.tickets-form input[type="checkbox"]:focus,
.tickets-form input[type="radio"]:focus {
  box-shadow: none;
  outline: 2px solid color-mix(in srgb, var(--primary) 55%, transparent);
  outline-offset: 2px;
}

.tickets-form-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 4px;
}

.tickets-form-actions button[type="submit"] {
  margin-top: 0;
  padding: 10px 16px;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--primary);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}

.tickets-form-actions button[type="submit"]:hover:not(:disabled) {
  background: var(--primary-hover);
}

.tickets-form-actions button[type="submit"]:disabled {
  opacity: 0.65;
  cursor: wait;
}

.tickets-filter {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.85rem;
  min-width: 160px;
}

.tickets-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: flex-end;
}

.ticket-status-line {
  margin: 4px 0 0;
}

.ticket-recipients {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--surface-2);
  /* fieldset default min-width:min-content overflows the form */
  min-width: 0;
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
}

.ticket-recipients legend {
  font-weight: 600;
  padding: 0 4px;
}

.ticket-recipients-all {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  font-weight: 500;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin: 0;
  cursor: pointer;
}

.ticket-recipients-all input[type="checkbox"] {
  flex: 0 0 auto;
  margin-top: 0.2rem;
}

.ticket-recipients-staff {
  padding: 0.55rem 0.65rem;
  border: 1px solid color-mix(in srgb, var(--primary) 22%, var(--line));
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--primary-soft) 45%, #fff);
}

.ticket-recipients-staff strong {
  display: block;
  font-size: 0.92rem;
  color: var(--text);
}

.ticket-recipients-all-hint {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.8rem;
  font-weight: 500;
}

.ticket-participants-staff-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.55rem;
}

.ticket-participants-add-staff:disabled {
  opacity: 0.7;
  cursor: default;
}

.ticket-recipients-search-label {
  min-width: 0;
  max-width: 100%;
}

.ticket-recipient-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  max-height: 220px;
  overflow-x: hidden;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  padding: 0;
  min-width: 0;
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
}

.ticket-recipient-option {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  padding: 0.55rem 0.65rem;
  border-radius: 0;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  margin: 0;
}

.ticket-recipient-option input[type="checkbox"] {
  flex: 0 0 auto;
  margin-top: 0.2rem;
}

.ticket-recipient-option:last-child {
  border-bottom: none;
}

.ticket-recipient-option:hover {
  background: var(--primary-ghost);
}

.ticket-recipient-option.is-disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.ticket-recipient-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-align: left;
}

.ticket-recipient-meta strong {
  font-size: 0.92rem;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.ticket-recipient-meta .muted {
  font-size: 0.8rem;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.ticket-participant {
  gap: 0.45rem;
}

.ticket-participant-remove {
  flex: 0 0 auto;
  margin-left: auto;
  padding: 0.25rem 0.55rem !important;
  font-size: 0.75rem !important;
}

.ticket-participant-creator {
  font-weight: 500;
  font-size: 0.72rem;
}

.ticket-participants-manage {
  margin-top: 0.75rem;
  padding-top: 0.65rem;
  border-top: 1px solid var(--line);
  min-width: 0;
  max-width: 100%;
}

.ticket-participants-add > summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--primary);
  list-style: none;
}

.ticket-participants-add > summary::-webkit-details-marker {
  display: none;
}

.ticket-participants-add-body {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.55rem;
  min-width: 0;
  max-width: 100%;
}

.ticket-participants-add-list {
  max-height: 160px;
  min-width: 0;
  max-width: 100%;
}

.ticket-participants-add-submit {
  align-self: flex-start;
}

/* Read receipts (staff messages) — quieter */
.ticket-reads {
  position: relative;
  display: flex;
  justify-content: flex-end;
  margin-top: 0.35rem;
}

.ticket-reads-trigger {
  appearance: none;
  border: none;
  background: transparent;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.15rem 0.2rem;
  margin: 0;
  cursor: pointer;
  border-radius: 4px;
  transition: background var(--transition);
}

.ticket-reads-trigger:hover,
.ticket-reads.is-open .ticket-reads-trigger {
  background: rgba(0, 77, 67, 0.06);
}

.ticket-reads-trigger:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.ticket-reads-avatars {
  display: inline-flex;
  align-items: center;
  flex-direction: row-reverse;
}

.ticket-reads-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.1rem;
  height: 1.1rem;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary-strong);
  font-size: 0.5rem;
  font-weight: 700;
  border: 1px solid #fff;
  margin-left: -0.25rem;
  box-shadow: none;
}

.ticket-reads-avatars .ticket-reads-avatar:last-child {
  margin-left: 0;
}

.ticket-reads-avatar--count {
  background: #e6e9e3;
  color: var(--muted);
  min-width: 1.1rem;
  width: auto;
  padding: 0 0.25rem;
  font-size: 0.55rem;
  font-variant-numeric: tabular-nums;
}

.ticket-reads-status {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.01em;
}

.ticket-reads-ticks {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  user-select: none;
}

.ticket-reads-ticks.is-none {
  color: #94a3b8;
}

.ticket-reads-ticks.is-some {
  color: var(--muted);
}

.ticket-reads-ticks.is-all {
  color: var(--primary);
}

.ticket-reads-popover {
  position: absolute;
  right: 0;
  bottom: calc(100% + 6px);
  z-index: 40;
  width: min(300px, 78vw);
  max-height: min(360px, 50vh);
  overflow: auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  padding: 0;
}

.ticket-reads-popover-head {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 0.65rem;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 1;
}

.ticket-reads-popover-head strong {
  font-size: 0.82rem;
  font-weight: 650;
}

.ticket-reads-popover-head .muted {
  font-size: 0.75rem;
  margin-right: auto;
}

.ticket-reads-close {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
}

.ticket-reads-close:hover {
  background: var(--surface-2);
  color: var(--text);
}

.ticket-reads-popover-body {
  padding: 0.5rem 0.6rem 0.65rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.ticket-reads-heading {
  margin: 0 0 0.3rem;
  font-size: 0.68rem;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.ticket-reads-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.2rem;
  padding: 0 0.35rem;
  height: 1.05rem;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text);
  font-size: 0.65rem;
  font-variant-numeric: tabular-nums;
}

.ticket-reads-col--yes .ticket-reads-count-badge {
  background: var(--success-soft);
  color: var(--success);
}

.ticket-reads-col--no .ticket-reads-count-badge {
  background: var(--warn-soft);
  color: var(--warn);
}

.ticket-reads-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  max-height: 140px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-2);
}

.ticket-read-item {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.4rem 0.55rem;
  border-bottom: 1px solid rgba(33, 37, 41, 0.05);
}

.ticket-read-item:last-child {
  border-bottom: none;
}

.ticket-read-avatar {
  flex: 0 0 auto;
  width: 1.45rem;
  height: 1.45rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.58rem;
  font-weight: 750;
  background: #e8eaf5;
  color: var(--muted);
}

.ticket-read-item--yes .ticket-read-avatar {
  background: var(--success-soft);
  color: var(--success);
}

.ticket-read-item--no .ticket-read-avatar {
  background: var(--warn-soft);
  color: var(--warn);
}

.ticket-read-meta {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 0;
  flex: 1 1 auto;
}

.ticket-read-name {
  font-size: 0.8rem;
  font-weight: 650;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ticket-read-sub {
  font-size: 0.68rem;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ticket-read-time {
  color: var(--muted);
  font-size: 0.68rem;
  white-space: nowrap;
  flex: 0 0 auto;
  font-variant-numeric: tabular-nums;
}

.ticket-read-time--pending {
  opacity: 0.55;
}

.ticket-read-empty {
  padding: 0.55rem 0.65rem;
  font-size: 0.78rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* —— Matchs (suggestions peer) —— */
.tab-eyebrow--matches {
  color: var(--primary);
}

.matches-hero {
  align-items: center;
}

.matches-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
  flex-shrink: 0;
}

/* Primary / secondary / ghost — match design system (pill, refined) */
.btn-match-primary,
.btn-match-secondary,
.btn-match-ghost {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.88rem;
  line-height: 1.2;
  border-radius: 999px;
  cursor: pointer;
  transition:
    background 0.14s ease,
    color 0.14s ease,
    border-color 0.14s ease,
    box-shadow 0.14s ease,
    opacity 0.12s ease,
    transform 0.12s ease;
  white-space: nowrap;
}

.btn-match-primary {
  border: 1px solid transparent;
  padding: 0.65rem 1.15rem;
  background: linear-gradient(180deg, #17b6a4 0%, var(--primary) 100%);
  color: #fff;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.18) inset,
    0 8px 20px rgba(0, 77, 67, 0.28);
}

.btn-match-primary:hover:not(:disabled) {
  background: linear-gradient(180deg, #004d43 0%, var(--primary-hover) 100%);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.12) inset,
    0 10px 24px rgba(0, 77, 67, 0.34);
  transform: translateY(-1px);
}

.btn-match-primary:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: 0 4px 12px rgba(0, 77, 67, 0.22);
}

.btn-match-primary:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring), 0 8px 20px rgba(0, 77, 67, 0.28);
}

.btn-match-primary:disabled,
.btn-match-primary.is-busy {
  opacity: 0.72;
  cursor: not-allowed;
  transform: none;
}

.btn-match-primary.is-busy {
  cursor: wait;
}

.match-detail-conversation-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
}

.match-conversation-status {
  margin: 0.55rem 0 0;
  font-size: 0.88rem;
  line-height: 1.4;
}

.match-conversation-status--draft {
  color: var(--text);
  font-weight: 650;
}

.match-conversation-status--open {
  color: var(--muted);
}

.btn-match-primary--sm {
  padding: 0.55rem 1rem;
  font-size: 0.85rem;
}

.btn-match-secondary {
  border: 1px solid var(--line);
  padding: 0.6rem 1.05rem;
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

.btn-match-secondary:hover:not(:disabled) {
  border-color: rgba(0, 77, 67, 0.45);
  color: var(--primary);
  background: var(--primary-soft);
}

.btn-match-secondary:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.btn-match-secondary:disabled {
  opacity: 0.55;
  cursor: wait;
}

.btn-match-ghost {
  border: 1px solid transparent;
  padding: 0.55rem 0.95rem;
  background: transparent;
  color: var(--muted);
  font-weight: 650;
}

.btn-match-ghost:hover:not(:disabled) {
  color: var(--error, #b42318);
  background: var(--error-soft, rgba(180, 35, 24, 0.08));
  border-color: rgba(180, 35, 24, 0.12);
}

.btn-match-ghost:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.btn-match-ghost:disabled {
  opacity: 0.5;
  cursor: wait;
}

/* Filters */
.matches-filters {
  margin-bottom: 0 !important;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

/* Skyscanner-style horizontal day rail (presentation date) */
.matches-day-section {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  min-width: 0;
}

.matches-day-label {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 650;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.matches-day-rail {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.45rem;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0.15rem 0.1rem 0.45rem;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.matches-day-rail::-webkit-scrollbar {
  height: 6px;
}

.matches-day-rail::-webkit-scrollbar-thumb {
  background: rgba(0, 77, 67, 0.22);
  border-radius: 999px;
}

.matches-day-chip {
  flex: 0 0 auto;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.1rem;
  min-width: 3.35rem;
  min-height: 3.85rem;
  padding: 0.4rem 0.45rem 0.35rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #eef0eb;
  color: var(--text);
  font: inherit;
  cursor: pointer;
  transition:
    border-color 0.12s ease,
    background-color 0.12s ease,
    box-shadow 0.12s ease,
    color 0.12s ease;
}

.matches-day-chip--all {
  min-width: 3.75rem;
}

.matches-day-chip:hover {
  border-color: rgba(0, 77, 67, 0.4);
  background: var(--surface);
}

.matches-day-chip:focus-visible {
  outline: none;
  border-color: var(--primary);
  box-shadow: var(--focus-ring);
}

.matches-day-chip.is-selected {
  border-color: var(--primary);
  background: rgba(0, 77, 67, 0.1);
  box-shadow: inset 0 -3px 0 0 var(--primary);
  color: var(--primary);
}

.matches-day-chip.is-empty:not(.is-selected) {
  color: var(--muted);
  opacity: 0.72;
}

.matches-day-chip-top {
  font-size: 0.68rem;
  font-weight: 650;
  letter-spacing: 0.02em;
  text-transform: capitalize;
  line-height: 1.1;
  white-space: nowrap;
}

.matches-day-chip-day {
  font-size: 1.05rem;
  font-weight: 750;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.matches-day-chip-badge {
  font-size: 0.68rem;
  font-weight: 650;
  line-height: 1;
  color: var(--muted);
  min-height: 0.85rem;
}

.matches-day-chip.is-selected .matches-day-chip-badge {
  color: var(--primary);
}

.matches-filters-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.2fr) minmax(100px, 0.7fr);
  gap: 0.65rem 0.85rem;
  align-items: end;
}

.matches-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
  font-size: 0.78rem;
  font-weight: 650;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.matches-field select,
.matches-field input {
  appearance: none;
  width: 100%;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  background: #eef0eb
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%2368708a' d='M1.4.6 6 5.2 10.6.6 12 2 6 8 0 2z'/%3E%3C/svg%3E")
    no-repeat right 0.75rem center / 10px;
  transition:
    border-color 0.12s ease,
    box-shadow 0.12s ease,
    background-color 0.12s ease;
}

.matches-field input {
  background-image: none;
}

.matches-field select:focus,
.matches-field input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: var(--focus-ring);
  background-color: var(--surface);
}

/* List + cards */
.matches-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.matches-loading {
  margin: 0;
  padding: 1.25rem 1rem;
  text-align: center;
}

.matches-empty {
  text-align: center;
  padding: 2.25rem 1.5rem !important;
  border: 1px dashed rgba(0, 77, 67, 0.28) !important;
  background: linear-gradient(180deg, #eef0eb 0%, var(--surface) 100%) !important;
  box-shadow: none !important;
}

.matches-empty-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 0.85rem;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 1.25rem;
  font-weight: 700;
}

.matches-empty h3 {
  margin: 0 0 0.4rem;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
}

.matches-empty p {
  margin: 0 auto 1.15rem;
  max-width: 36rem;
  line-height: 1.5;
}

.match-card {
  --match-score-color: var(--primary);
  padding: 1.15rem 1.25rem 1rem !important;
  border: 1px solid var(--line) !important;
  box-shadow: var(--shadow-sm) !important;
  transition:
    border-color 0.14s ease,
    box-shadow 0.14s ease;
}

.match-card:hover {
  border-color: rgba(0, 77, 67, 0.28) !important;
  box-shadow: 0 12px 36px rgba(18, 33, 27, 0.07) !important;
}

.match-card--high {
  --match-score-color: #047857;
}

.match-card--mid {
  --match-score-color: var(--primary);
}

.match-card--low {
  --match-score-color: #b54708;
}

.match-card-header {
  display: flex;
  gap: 0.9rem;
  align-items: center;
  margin-bottom: 0.95rem;
}

.match-card-header-text {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.match-card-kicker {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.match-score-ring {
  flex: 0 0 auto;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  padding: 4px;
}

.match-score-inner {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--surface);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1;
  box-shadow: inset 0 0 0 1px rgba(232, 234, 244, 0.9);
}

.match-score-value {
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--match-score-color);
  font-variant-numeric: tabular-nums;
}

.match-score-unit {
  font-size: 0.6rem;
  font-weight: 700;
  color: var(--muted);
  margin-top: 1px;
}

/* Two entity columns */
.match-entities {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 0.65rem 0.75rem;
  align-items: stretch;
  margin-bottom: 0.95rem;
}

.match-entity {
  min-width: 0;
  padding: 0.9rem 0.95rem;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #eef0eb;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.match-entity--b {
  background: #fcfbff;
}

.match-entity-head {
  display: flex;
  gap: 0.55rem;
  align-items: flex-start;
}

.match-avatar {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--primary);
  background: var(--primary-soft);
  border: 1px solid rgba(0, 77, 67, 0.14);
}

.match-avatar--b {
  color: #004d43;
  background: #f3e8ff;
  border-color: rgba(91, 33, 182, 0.12);
}

.match-entity-titles {
  min-width: 0;
  flex: 1;
}

.match-entity-name {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
  line-height: 1.25;
  word-break: break-word;
}

/* Clickable company name → fiche popup */
button.match-entity-name--btn {
  appearance: none;
  display: inline;
  margin: 0;
  padding: 0;
  border: none;
  background: none;
  font: inherit;
  font-size: 0.98rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--primary);
  line-height: 1.25;
  word-break: break-word;
  text-align: left;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: rgba(0, 77, 67, 0.28);
  text-underline-offset: 0.14em;
  transition:
    color 0.12s ease,
    text-decoration-color 0.12s ease;
}

button.match-entity-name--btn:hover {
  color: #004d43;
  text-decoration-color: rgba(0, 56, 48, 0.55);
}

button.match-entity-name--btn:focus-visible {
  outline: none;
  border-radius: 4px;
  box-shadow: var(--focus-ring);
}

.match-entity-meta {
  margin: 0.25rem 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem 0.35rem;
  align-items: center;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
  line-height: 1.35;
}

.match-entity-meta-sep {
  opacity: 0.45;
}

.match-entity-desc {
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.5;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.match-entity-desc--empty {
  color: var(--muted);
  font-style: italic;
}

.match-entity-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-top: auto;
}

.match-entity-tag {
  display: inline-flex;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 650;
  background: rgba(0, 77, 67, 0.08);
  color: #003830;
  border: 1px solid rgba(0, 77, 67, 0.1);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.match-entities-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 1.5rem;
}

.match-entities-divider-label {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--primary);
  background: var(--primary-soft);
  border: 1px solid rgba(0, 77, 67, 0.16);
}

.match-why {
  padding: 0.85rem 0.95rem;
  border-radius: 14px;
  background: linear-gradient(180deg, #eef0eb 0%, #f3f4fb 100%);
  border: 1px solid rgba(228, 229, 227, 0.95);
  margin-bottom: 0.15rem;
}

/* Hero block: the business reason must be the first thing the eye hits */
.match-why--hero {
  order: 0;
  margin: 0 0 0.85rem;
  padding: 1rem 1.05rem 0.95rem;
  background: linear-gradient(
    135deg,
    rgba(0, 77, 67, 0.1) 0%,
    rgba(0, 77, 67, 0.04) 45%,
    #eef0eb 100%
  );
  border: 1px solid rgba(0, 77, 67, 0.18);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.7) inset;
}

.match-why--hero .match-why-title {
  color: #003830;
  margin-bottom: 0.4rem;
}

.match-why-title {
  margin: 0 0 0.25rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.match-why-hint {
  margin: 0 0 0.55rem;
  font-size: 0.78rem;
  line-height: 1.4;
  color: var(--muted);
  font-weight: 500;
}

.match-type-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}

.match-type-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  background: var(--primary-soft);
  color: var(--primary);
  border: 1px solid rgba(0, 77, 67, 0.12);
}

.match-type-pill--partenariat {
  background: #c5e4db;
  color: #003830;
  border-color: rgba(0, 56, 48, 0.12);
}

.match-type-pill--consortium {
  background: #ecfdf5;
  color: #047857;
  border-color: rgba(4, 120, 87, 0.12);
}

.match-type-pill--proximite {
  background: #fff7ed;
  color: #c2410c;
  border-color: rgba(194, 65, 12, 0.12);
}

.match-badge-new {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: rgba(16, 185, 129, 0.12);
  color: #047857;
  border: 1px solid rgba(4, 120, 87, 0.14);
}

.match-badge-dismissed {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: rgba(180, 35, 24, 0.08);
  color: #b42318;
  border: 1px solid rgba(180, 35, 24, 0.14);
}

.match-badge-seen {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: rgba(104, 112, 138, 0.12);
  color: #4b5568;
  border: 1px solid rgba(104, 112, 138, 0.18);
}

.match-badge-starred {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  background: rgba(245, 158, 11, 0.14);
  color: #b45309;
  border: 1px solid rgba(180, 83, 9, 0.18);
}

.match-card--starred {
  border-color: rgba(245, 158, 11, 0.35) !important;
  box-shadow:
    0 0 0 1px rgba(245, 158, 11, 0.08),
    var(--shadow-sm) !important;
}

.btn-match-star {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.35rem;
  height: 2.35rem;
  padding: 0;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: #9ca3af;
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition:
    color 0.12s ease,
    background 0.12s ease,
    border-color 0.12s ease,
    transform 0.12s ease;
}

.btn-match-star:hover:not(:disabled) {
  color: #b45309;
  border-color: rgba(245, 158, 11, 0.45);
  background: rgba(245, 158, 11, 0.08);
}

.btn-match-star.is-on {
  color: #d97706;
  border-color: rgba(217, 119, 6, 0.35);
  background: rgba(245, 158, 11, 0.12);
}

.btn-match-star:disabled {
  opacity: 0.55;
  cursor: wait;
}

.btn-match-star:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.match-badge-notes {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  background: rgba(37, 99, 235, 0.1);
  color: #1d4ed8;
  border: 1px solid rgba(37, 99, 235, 0.16);
}

/* Match detail drawer */
body.match-detail-open {
  overflow: hidden;
}

.match-detail-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  justify-content: flex-end;
}

.match-detail-overlay.hidden {
  display: none;
}

.match-detail-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(18, 33, 27, 0.35);
  border: none;
  cursor: pointer;
}

.match-detail-panel {
  position: relative;
  z-index: 1;
  /* Wide enough for two entity columns + notes without feeling cramped */
  width: min(1040px, 96vw);
  max-width: 100%;
  height: 100%;
  background: var(--bg);
  box-shadow: -12px 0 40px rgba(18, 33, 27, 0.12);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.match-detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 1.2rem;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.match-detail-head h3 {
  margin: 0.15rem 0 0;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.match-detail-body {
  flex: 1;
  overflow: auto;
  padding: 1rem 1.2rem;
}

.match-detail-notes {
  margin: 0;
  border-radius: 0 !important;
  border-left: none !important;
  border-right: none !important;
  border-bottom: none !important;
  box-shadow: none !important;
  padding: 1rem 1.2rem 1.25rem !important;
  background: var(--surface) !important;
}

.match-notes-input {
  width: 100%;
  box-sizing: border-box;
  margin-top: 0.35rem;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  font: inherit;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--text);
  background: #eef0eb;
  resize: vertical;
  min-height: 8rem;
}

.match-notes-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: var(--focus-ring);
  background: var(--surface);
}

.match-detail-notes-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  margin-top: 0.75rem;
}

.match-score-inline {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--primary);
  background: var(--primary-soft);
  border: 1px solid rgba(0, 77, 67, 0.14);
  font-variant-numeric: tabular-nums;
}

.match-card--dismissed {
  opacity: 0.92;
}

.match-card--dismissed .match-pitch {
  opacity: 0.9;
}

.match-card--seen {
  opacity: 0.96;
}

.match-pitch {
  margin: 0 0 0.55rem;
  line-height: 1.55;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text);
}

.match-pitch--hero {
  margin: 0 0 0.55rem;
  font-size: 1.05rem;
  font-weight: 750;
  letter-spacing: -0.015em;
  line-height: 1.4;
  color: #11142d;
}

.match-pitch--empty {
  font-weight: 500;
  color: var(--muted);
  font-style: italic;
}

.match-reasons {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.match-why--hero .match-reasons {
  margin-top: 0.15rem;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(0, 77, 67, 0.12);
}

.match-reasons li {
  position: relative;
  margin: 0;
  padding: 0.05rem 0 0.05rem 0.9rem;
  color: #4b5568;
  font-size: 0.8rem;
  line-height: 1.4;
  font-weight: 500;
}

.match-reasons li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(0, 77, 67, 0.55);
}

/* Compact pair strip under the hero pitch */
.match-entities--compact {
  margin-bottom: 0.35rem;
  gap: 0.45rem 0.55rem;
}

.match-entity--compact {
  padding: 0.55rem 0.7rem;
  gap: 0;
  background: #eef0eb;
}

.match-entity--compact .match-entity-head {
  gap: 0.55rem;
}

.match-entity--compact .match-avatar {
  width: 2rem;
  height: 2rem;
  font-size: 0.72rem;
}

.match-entity--compact .match-entity-name {
  font-size: 0.9rem;
}

.match-entities--compact .match-entities-divider {
  padding-top: 0;
  align-self: center;
}

.match-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--line);
}

@media (max-width: 860px) {
  .match-entities {
    grid-template-columns: 1fr;
  }

  .match-entities-divider {
    padding: 0;
    justify-content: center;
  }

  .match-entities-divider-label {
    transform: rotate(90deg);
  }
}

@media (max-width: 720px) {

  .matches-filters-grid {
    grid-template-columns: 1fr;
  }

  .matches-hero {
    flex-direction: column;
    align-items: stretch;
  }

  .matches-hero-actions {
    justify-content: stretch;
  }

  .matches-hero-actions .btn-match-primary,
  .matches-hero-actions .btn-match-secondary {
    flex: 1;
  }
}

/* —— Notifications bell —— */
.notif-wrap {
  position: relative;
}

.notif-bell {
  appearance: none;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}

.notif-bell:hover {
  border-color: rgba(0, 77, 67, 0.4);
  background: var(--primary-soft);
}

.notif-bell-icon {
  font-size: 1rem;
  line-height: 1;
}

.notif-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 1.15rem;
  height: 1.15rem;
  padding: 0 0.3rem;
  border-radius: 999px;
  background: var(--error, #b42318);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 800;
  display: grid;
  place-items: center;
  font-variant-numeric: tabular-nums;
}

.notif-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: min(360px, calc(100vw - 2rem));
  max-height: min(420px, 70vh);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  z-index: 100;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.notif-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.75rem 0.9rem;
  border-bottom: 1px solid var(--line);
  font-size: 0.9rem;
}

.notif-mark-all {
  appearance: none;
  border: none;
  background: none;
  color: var(--primary);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
}

.notif-list {
  overflow: auto;
  padding: 0.35rem 0;
}

.notif-empty {
  margin: 0;
  padding: 1rem 0.9rem;
  text-align: center;
  font-size: 0.88rem;
}

.notif-item {
  display: block;
  width: 100%;
  text-align: left;
  appearance: none;
  border: none;
  background: transparent;
  padding: 0.7rem 0.9rem;
  cursor: pointer;
  font: inherit;
  border-bottom: 1px solid rgba(228, 229, 227, 0.8);
}

.notif-item:hover {
  background: var(--primary-soft);
}

.notif-item.is-unread {
  background: rgba(0, 77, 67, 0.06);
}

.notif-item-title {
  margin: 0 0 0.2rem;
  font-size: 0.86rem;
  font-weight: 750;
  color: var(--text);
}

.notif-item-body {
  margin: 0;
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.4;
}

.notif-item-time {
  margin: 0.25rem 0 0;
  font-size: 0.72rem;
  color: var(--muted);
  font-weight: 600;
}

.match-detail-actions {
  margin: 0 !important;
  border-radius: 0 !important;
  border-left: none !important;
  border-right: none !important;
  border-bottom: none !important;
  box-shadow: none !important;
  padding: 1rem 1.2rem 1.25rem !important;
}

/* Introduction confirm dialog (create discussion — yes/no) */
dialog.match-intro-dialog {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  color: var(--text);
  width: min(440px, 94vw);
  max-width: 94vw;
  padding: 0;
  margin: auto;
  box-shadow: 0 28px 80px rgba(18, 33, 27, 0.2);
  overflow: hidden;
}

dialog.match-intro-dialog::backdrop {
  background: rgba(18, 33, 27, 0.48);
  backdrop-filter: blur(4px);
}

.match-intro-dialog-inner {
  display: flex;
  flex-direction: column;
  margin: 0;
}

.match-intro-dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 1.25rem;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #eef0eb 0%, var(--surface) 100%);
}

.match-intro-dialog-head h2 {
  margin: 0.15rem 0 0;
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.match-intro-dialog-sub {
  margin: 0.35rem 0 0;
  font-size: 0.88rem;
  line-height: 1.4;
}

.match-intro-dialog-body {
  padding: 1rem 1.25rem;
}

.match-intro-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 750;
  color: var(--text);
  margin-bottom: 0.35rem;
}

.match-intro-optional {
  font-weight: 600;
  color: var(--muted);
  font-size: 0.8rem;
}

.match-intro-confirm-text {
  margin: 0 0 0.55rem;
  font-size: 1rem;
  font-weight: 650;
  line-height: 1.45;
  color: var(--text);
}

.match-intro-hint {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.45;
}

.match-intro-dialog-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.55rem;
  padding: 0.9rem 1.25rem 1.15rem;
  border-top: 1px solid var(--line);
  background: #eef0eb;
}

.ticket-kind-pill {
  display: inline-flex;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  background: var(--primary-soft);
  color: var(--primary);
}

/* Discussion participants (scales to large broadcast audiences) */
.ticket-participants {
  margin: 0 0 0.75rem !important;
  padding: 0.65rem 0.9rem !important;
}

.ticket-participants-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem 0.65rem;
  margin-bottom: 0.45rem;
}

.ticket-participants-title {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.01em;
  text-transform: none;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.ticket-participants-details {
  margin: 0;
}

.ticket-participants-summary {
  list-style: none;
  cursor: pointer;
  user-select: none;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem 0.75rem;
  padding: 0.1rem 0;
}

.ticket-participants-summary::-webkit-details-marker {
  display: none;
}

.ticket-participants-summary-main {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.55rem;
  min-width: 0;
}

.ticket-participants-counts {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem;
}

.ticket-participants-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.08rem 0.4rem;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--line);
  letter-spacing: 0;
  text-transform: none;
}

.ticket-participants-pill--company {
  background: transparent;
  color: var(--primary);
  border-color: rgba(0, 77, 67, 0.2);
}

.ticket-participants-pill--staff {
  background: transparent;
  color: var(--primary-strong);
  border-color: rgba(0, 77, 67, 0.2);
}

.ticket-participants-avatars {
  display: inline-flex;
  align-items: center;
}

.ticket-participants-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.45rem;
  height: 1.45rem;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary-strong);
  font-size: 0.55rem;
  font-weight: 650;
  border: 1.5px solid var(--surface-2);
  margin-left: -5px;
}

.ticket-participants-avatar:first-child {
  margin-left: 0;
}

.ticket-participants-avatar--animateur,
.ticket-participants-avatar--admin {
  background: #c5e4db;
  color: #004d43;
}

.ticket-participants-avatar--more {
  background: #e6e9e3;
  color: var(--muted);
  font-size: 0.55rem;
  min-width: 1.45rem;
  width: auto;
  padding: 0 0.3rem;
  font-variant-numeric: tabular-nums;
}

.ticket-participants-hint {
  font-size: 0.75rem;
  font-weight: 550;
  color: var(--primary);
}

.ticket-participants-details[open] .ticket-participants-hint {
  color: var(--muted);
}

.ticket-participants-details[open] .ticket-participants-hint::after {
  content: none;
}

.ticket-participants-body {
  margin-top: 0.45rem;
}

.ticket-participants-toolbar {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-bottom: 0.45rem;
}

.ticket-participants-search input {
  width: 100%;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font: inherit;
  font-size: 0.85rem;
  background: #fff;
  color: var(--text);
}

.ticket-participants-search input:focus {
  outline: none;
  box-shadow: var(--focus-ring);
  border-color: var(--primary);
}

.ticket-participants-segments {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  padding: 0;
  border-radius: 0;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--line);
}

.ticket-participants-seg {
  appearance: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 550;
  padding: 0.4rem 0.65rem;
  border-radius: 0;
  cursor: pointer;
  flex: 0 0 auto;
  min-width: 0;
  text-align: center;
}

.ticket-participants-seg:hover {
  color: var(--text);
  background: transparent;
}

.ticket-participants-seg.is-active {
  background: transparent;
  color: var(--primary);
  box-shadow: none;
  border-bottom-color: var(--primary);
  font-weight: 650;
}

.ticket-participants-visible {
  margin: 0;
  font-size: 0.75rem;
  min-height: 1em;
}

.ticket-participants-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  max-height: none;
}

.ticket-participants--large .ticket-participants-list {
  max-height: min(42vh, 360px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
}

.ticket-participant {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--line);
}

.ticket-participant:last-child {
  border-bottom: none;
}

.ticket-participants--large .ticket-participant {
  padding: 0.45rem 0.65rem;
  border-bottom: 1px solid var(--line);
}

.ticket-participants--large .ticket-participant:last-child {
  border-bottom: none;
}

.ticket-participant[hidden] {
  display: none !important;
}

.ticket-participant-avatar {
  flex: 0 0 auto;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 0.62rem;
  font-weight: 650;
  color: var(--primary);
  background: var(--primary-soft);
  border: none;
}

.ticket-participant-avatar--company {
  color: var(--primary);
  background: var(--primary-soft);
}

.ticket-participant-avatar--animateur,
.ticket-participant-avatar--admin {
  color: #004d43;
  background: #c5e4db;
}

.ticket-participant-meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
}

.ticket-participant-name {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ticket-participant-sub {
  font-size: 0.76rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ticket-participant-role {
  flex-shrink: 0;
  font-size: 0.72rem;
  font-weight: 550;
  letter-spacing: 0;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  border: none;
}

.ticket-participant-role--company {
  background: transparent;
  color: var(--muted);
  border: none;
}

.ticket-participant-role--animateur,
.ticket-participant-role--admin {
  background: transparent;
  color: var(--primary);
  border: none;
}

.ticket-participants-empty {
  margin: 0.5rem 0 0;
  font-size: 0.82rem;
  text-align: center;
}

/* ════════════════════════════════════════════════════════════════════
   ORVEX "STRATUM" — polish layer (2026)
   Refined chrome, iconography, motion. Loaded last: wins the cascade
   at equal specificity. JS contracts (classes/ids) are untouched.
   ════════════════════════════════════════════════════════════════════ */

/* ——— 1. Foundations ——— */

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 400;
  /* Display cut is already condensed — avoid extra negative tracking */
  letter-spacing: 0.01em;
}

strong {
  font-weight: 650;
}

:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
  border-radius: 6px;
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  border-radius: var(--radius-sm);
}

* {
  scrollbar-width: thin;
  scrollbar-color: #c5c8c3 transparent;
}

*::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

*::-webkit-scrollbar-thumb {
  background: #c5c8c3;
  border-radius: 99px;
}

*::-webkit-scrollbar-track {
  background: transparent;
}

/* ——— 2. Brand mark ——— */

.brand-symbol {
  padding: 0;
  overflow: hidden;
}

.brand-symbol svg {
  display: block;
  width: 58%;
  height: 58%;
}

.topbar .brand-symbol,
.login-panel .brand-symbol {
  background: transparent;
  color: inherit;
  box-shadow: none;
  border-radius: 0;
}

.rail-brand .brand-symbol,
.brand-symbol--rail {
  background: transparent;
  color: inherit;
  box-shadow: none;
  border-radius: 0;
}

/* ——— 3. Auth full-screen split (hero image + credentials) ——— */

/* Lock page chrome while the login screen is open */
body:has(#login-panel:not([hidden]):not(.hidden)) {
  overflow: hidden;
  height: 100vh;
  height: 100dvh;
  padding-bottom: 0 !important;
}

body:has(#login-panel:not([hidden]):not(.hidden)) > .topbar,
body:has(#login-panel:not([hidden]):not(.hidden)) > #nav-backdrop,
body:has(#login-panel:not([hidden]):not(.hidden)) > #impersonation-banner {
  display: none !important;
}

.auth-screen {
  position: fixed;
  inset: 0;
  z-index: 40;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: stretch;
  padding: 0;
  margin: 0;
  background: var(--surface);
}

.auth-screen[hidden],
.auth-screen.hidden {
  display: none !important;
}

.auth-shell {
  width: 100%;
  height: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(22rem, 26.5rem);
  border-radius: 0;
  overflow: hidden;
  box-shadow: none;
  border: 0;
  background: var(--surface);
}

/* Left — huge photo from pole-avenia.com homepage hero */
.auth-visual {
  position: relative;
  min-height: 100%;
  overflow: hidden;
  background: #12211b;
}

.auth-visual-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
  display: block;
}

.auth-visual-scrim {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(
      105deg,
      rgba(18, 33, 27, 0.55) 0%,
      rgba(18, 33, 27, 0.22) 42%,
      rgba(18, 33, 27, 0.08) 70%,
      rgba(18, 33, 27, 0.35) 100%
    ),
    linear-gradient(0deg, rgba(18, 33, 27, 0.72) 0%, transparent 42%);
}

.auth-visual-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  padding: clamp(1.5rem, 3vw, 2.75rem);
  color: #eef2ef;
}

.auth-visual-logo {
  height: 36px;
  width: auto;
  max-width: 168px;
  margin-bottom: 0.85rem;
  display: block;
}

.auth-visual-kicker {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #c1f769;
}

.auth-visual-tagline {
  margin: 0;
  max-width: none;
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 1.9vw, 1.75rem);
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 1.2;
  color: #fff;
  white-space: nowrap;
}

/* Legacy auth-aside hooks (kept inert for old markup safety) */
.auth-aside {
  display: none;
}

.brand-symbol--auth {
  width: auto;
  height: 40px;
  border-radius: 0;
  background: transparent;
  color: inherit;
  display: grid;
  place-items: center;
  box-shadow: none;
  padding: 0;
}

.auth-eyebrow {
  margin: 0 0 0.9rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #b6e24a;
}

.auth-title {
  margin: 0;
  font-size: clamp(1.7rem, 2.6vw, 2.15rem);
  font-weight: 750;
  letter-spacing: -0.045em;
  line-height: 1.12;
  color: #fff;
}

.auth-lede {
  margin: 1rem 0 0;
  font-size: 0.95rem;
  line-height: 1.6;
  color: rgba(238, 242, 239, 0.72);
}

.auth-points {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* Right — credentials column */
.auth-shell .login-panel {
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: var(--surface);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  min-height: 100%;
  overflow: auto;
}

.auth-shell .login-panel-inner {
  width: 100%;
  max-width: 22rem;
  margin: auto auto;
  padding: clamp(1.75rem, 4vh, 2.75rem) clamp(1.35rem, 3vw, 2.1rem)
    clamp(1.5rem, 3vh, 2.25rem);
  flex: 0 0 auto;
}

.auth-shell .login-panel h1 {
  margin: 0.15rem 0 0.35rem;
  font-size: 1.55rem;
  font-weight: 750;
  letter-spacing: -0.04em;
}

.auth-shell .login-panel .eyebrow {
  margin-bottom: 0.4rem;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.auth-shell .panel-lead {
  margin: 0 0 0.25rem;
  max-width: none;
  font-size: 0.9rem;
  line-height: 1.55;
}

.auth-shell .login-form {
  margin-top: 1.35rem;
  gap: 1rem;
}

.auth-shell .login-form label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
  gap: 0.45rem;
}

.auth-shell .login-form input {
  padding: 0.72rem 0.9rem;
  font-size: 0.92rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.auth-shell .login-form input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: var(--focus-ring);
}

.auth-shell .login-form button[type="submit"] {
  margin-top: 0.35rem;
  padding: 0.78rem 1rem;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  border: 0;
  border-radius: 3.75rem;
  background: var(--brand-lime);
  color: #212529;
  box-shadow: 0 6px 18px -6px rgba(0, 77, 67, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.14);
  transition: transform var(--transition), box-shadow var(--transition), filter var(--transition);
}

.auth-shell .login-form button[type="submit"]:hover {
  filter: brightness(1.06);
  box-shadow: 0 10px 24px -8px rgba(0, 77, 67, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.auth-shell .login-form button[type="submit"]:active {
  transform: translateY(1px) scale(0.99);
}

/* Demo accounts — compact directory rows */
.auth-shell .login-demo {
  margin-top: 1.6rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}

.auth-shell .login-hint {
  margin: 0 0 0.6rem;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.auth-shell .login-demo-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
}

.auth-shell .login-demo-row {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(6.5rem, auto) 1fr;
  align-items: center;
  gap: 0.25rem 0.75rem;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  text-align: left;
  transition: border-color var(--transition), background var(--transition), box-shadow var(--transition);
}

.auth-shell .login-demo-row:hover {
  border-color: var(--primary);
  background: var(--primary-soft);
  box-shadow: var(--shadow-sm);
}

.auth-shell .login-demo-row strong {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text);
}

.auth-shell .login-demo-row code {
  grid-column: 1 / -1;
  font-size: 0.74rem;
  color: var(--muted);
  background: transparent;
  padding: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.auth-shell .login-demo-pass {
  display: none;
}

@media (max-width: 900px) {
  .auth-shell {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(32vh, 38vh) minmax(0, 1fr);
  }

  .auth-visual {
    min-height: 32vh;
  }

  .auth-visual-caption {
    padding: 1.15rem 1.25rem 1.25rem;
  }

  .auth-visual-logo {
    height: 28px;
    margin-bottom: 0.45rem;
  }

  .auth-visual-tagline {
    max-width: none;
    font-size: clamp(0.95rem, 3.6vw, 1.2rem);
    white-space: normal;
  }

  .auth-shell .login-panel {
    justify-content: flex-start;
  }

  .auth-shell .login-panel-inner {
    max-width: 26rem;
    margin: 1.25rem auto 0;
    padding: 0.75rem 1.35rem 1.25rem;
  }

  .powered-by--login {
    padding-left: 1.35rem;
    padding-right: 1.35rem;
  }
}

@media (max-width: 560px) {
  .auth-shell {
    grid-template-rows: minmax(26vh, 30vh) minmax(0, 1fr);
  }

  .auth-visual-kicker {
    font-size: 0.65rem;
  }

  .auth-visual-tagline {
    font-size: 0.95rem;
  }
}

/* ——— 4. Rail ——— */

.app-rail {
  background:
    radial-gradient(520px 360px at 0% 0%, rgba(193, 247, 105, 0.08), transparent 55%),
    linear-gradient(180deg, #1a2823 0%, #313a37 55%, #2a322f 100%);
  border-right: 1px solid rgba(255, 255, 255, 0.06);
}

.rail-nav-section-label {
  color: rgba(238, 242, 239, 0.4);
  letter-spacing: 0.11em;
}

.rail-nav .tab {
  gap: 0.7rem;
  padding: 0.62rem 0.75rem;
  border-radius: 10px;
  font-size: 0.875rem;
  font-weight: 600;
  color: rgba(238, 242, 239, 0.66);
  position: relative;
}

.rail-tab-icon {
  width: 1.12rem;
  height: 1.12rem;
  flex-shrink: 0;
  opacity: 0.85;
  transition: opacity var(--transition), color var(--transition);
}

.rail-nav .tab:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.rail-nav .tab:hover .rail-tab-icon {
  opacity: 1;
}

.rail-nav .tab.active {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  box-shadow: none;
}

/* No left edge bar on active nav — selection is background only */
.rail-nav .tab.active::before {
  content: none;
  display: none;
}

.rail-nav .tab.active .rail-tab-icon {
  opacity: 1;
  color: #e8f7a0;
}

body.rail-collapsed .rail-nav .tab.active::before {
  display: none;
}

.rail-aside {
  border-radius: 14px;
}

/* ——— 5. Topbar ——— */

body.has-app-shell .topbar {
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: saturate(1.4) blur(14px);
  box-shadow: 0 1px 0 rgba(33, 37, 41, 0.04);
}

.topbar-link {
  transition: border-color var(--transition), color var(--transition), background var(--transition), box-shadow var(--transition);
}

.topbar-link:hover {
  box-shadow: var(--shadow-sm);
}

.notif-bell {
  box-shadow: none;
  transition: border-color var(--transition), background var(--transition), color var(--transition);
}

.notif-bell-icon {
  display: grid;
  place-items: center;
}

.notif-bell-icon svg {
  width: 1.1rem;
  height: 1.1rem;
  color: var(--text);
}

.notif-bell:hover .notif-bell-icon svg {
  color: var(--primary);
}

.notif-badge {
  background: #dc2626;
  box-shadow: 0 0 0 2px var(--surface);
}

.notif-panel {
  border-radius: 16px;
  box-shadow: var(--shadow-md);
}

/* ——— 6. Buttons & fields ——— */

.btn-secondary,
.btn-ghost,
.chip,
.btn-soft {
  transition: border-color var(--transition), color var(--transition), background var(--transition), box-shadow var(--transition), transform var(--transition);
}

.btn-secondary:active,
.btn-ghost:active,
.chip:active {
  transform: translateY(1px);
}

button[type="submit"],
.agent-btn--search {
  letter-spacing: -0.01em;
}

input, select, textarea {
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: var(--focus-ring);
}

select {
  cursor: pointer;
}

/* Primary submit buttons outside auth (filters, tickets, admin forms) */
.filters-actions button[type="submit"],
.tickets-form button[type="submit"],
.admin-form button[type="submit"],
.admin-list-head button[type="submit"] {
  border: 0;
  border-radius: var(--radius-sm);
  background: var(--brand-lime);
  color: var(--brand-lime-ink);
  font-weight: 650;
  box-shadow: none;
  transition: filter var(--transition), background var(--transition);
}

.filters-actions button[type="submit"]:hover,
.tickets-form button[type="submit"]:hover,
.admin-form button[type="submit"]:hover,
.admin-list-head button[type="submit"]:hover {
  filter: brightness(1.04);
  background: var(--brand-lime-hover);
  box-shadow: none;
}

.filters-actions button[type="submit"]:active,
.tickets-form button[type="submit"]:active,
.admin-form button[type="submit"]:active {
  filter: brightness(0.98);
}

/* ——— 7. Panels & tab chrome ——— */

.panel {
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
}

.tab-toolbar {
  border-radius: 16px;
}

.tab-toolbar h2 {
  letter-spacing: -0.04em;
}

.tab-eyebrow {
  letter-spacing: 0.12em;
}

.tab-count {
  font-variant-numeric: tabular-nums;
}

/* ——— 8. Tiles (corpus cards) ——— */

.corpus-list {
  gap: 0.75rem;
}

.tile {
  border-radius: 14px;
  border: 1px solid var(--line);
  padding: 1rem 1.1rem;
  box-shadow: none;
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition), background var(--transition);
}

.tile.card-click:hover,
.tile:hover {
  border-color: rgba(0, 77, 67, 0.38);
  background: var(--surface);
  box-shadow: 0 2px 4px rgba(33, 37, 41, 0.04), 0 14px 32px -16px rgba(0, 77, 67, 0.22);
  transform: translateY(-1px);
}

.tile-side {
  gap: 0.45rem;
  padding-top: 0.15rem;
}

.tile-day {
  font-size: 0.82rem;
  font-weight: 750;
}

/* Harmonized status badges — pill + signal dot */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.34rem;
  font-size: 0.64rem;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.055em;
  padding: 0.24rem 0.55rem;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary);
  border: 1px solid rgba(0, 77, 67, 0.16);
  white-space: nowrap;
}

.badge::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 99px;
  background: currentColor;
  opacity: 0.85;
}

.badge-open {
  background: #ecfdf3;
  color: #067647;
  border-color: rgba(6, 118, 71, 0.18);
}

.badge-closed {
  background: var(--bg-subtle);
  color: var(--muted);
  border-color: var(--line);
}

.badge-warn {
  background: #fff7ed;
  color: #b45309;
  border-color: rgba(180, 83, 9, 0.2);
}

.tag {
  font-size: 0.72rem;
  font-weight: 550;
  padding: 0.2rem 0.55rem;
  border-radius: 7px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--muted);
}

.tile-link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
  padding: 0.2rem 0.5rem;
  margin: -0.2rem -0.5rem -0.2rem auto;
  border-radius: 7px;
  transition: background var(--transition), color var(--transition);
}

.tile-link::after {
  content: "↗";
  font-size: 0.72rem;
  opacity: 0.7;
  transition: transform var(--transition), opacity var(--transition);
}

.tile-link:hover {
  background: var(--primary-soft);
}

.tile-link:hover::after {
  transform: translate(1px, -1px);
  opacity: 1;
}

.tile-title {
  letter-spacing: -0.025em;
}

.tile-details summary {
  transition: color var(--transition);
}

.tile-details summary:hover {
  color: var(--primary);
}

/* ——— 9. Dashboard ——— */

.dash-metric {
  border-radius: 0;
  padding: 1.05rem 1.15rem;
  position: relative;
  overflow: hidden;
  transition: background var(--transition), color var(--transition);
}

/* Left accent bar removed — strip cells stay flat (no float lift) */
.dash-metric::before {
  content: none;
  display: none;
}

.dash-metric:hover {
  border-color: transparent;
  background: color-mix(in srgb, var(--primary) 5%, var(--surface));
  box-shadow: none;
  transform: none;
}

.dash-metric:hover::before {
  display: none;
}

.dash-metric-label {
  font-size: 0.74rem;
  font-weight: 650;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

.dash-metric-value {
  font-size: 1.85rem;
  font-weight: 780;
}

.dash-metric:focus-visible {
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--primary) 45%, transparent);
}

/* Sections open; explore panels remain secondary hairline cards (no soft float) */
.dash-section {
  border-radius: 0;
  box-shadow: none;
}

.dash-panel {
  border-radius: 12px;
  box-shadow: none;
}

.dash-panel-cta,
.dash-link {
  transition: color var(--transition), background var(--transition), border-color var(--transition);
}

/* Deadline table refinement */
.dash-deadline-table {
  font-variant-numeric: tabular-nums;
}

.dash-deadline-table [role="row"] {
  transition: background var(--transition);
}

.dash-deadline-table [role="row"]:hover {
  background: color-mix(in srgb, var(--primary) 4%, transparent);
}

/* ——— 10. Agent bar (IA search) ——— */

.agent-bar {
  border-radius: 16px;
}

.agent-badge {
  background: var(--brand-lime);
  color: #212529;
  box-shadow: 0 1px 2px rgba(33, 37, 41, 0.08);
  border: 1px solid color-mix(in srgb, var(--brand-lime) 70%, #313a37);
  font-weight: 700;
  letter-spacing: 0.04em;
}

.agent-field textarea {
  border-radius: var(--radius-sm);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.agent-field textarea:focus {
  border-color: var(--primary);
  box-shadow: var(--focus-ring);
}

.agent-btn {
  border-radius: var(--radius-sm);
  transition: filter var(--transition), box-shadow var(--transition), transform var(--transition), background var(--transition), border-color var(--transition), color var(--transition);
}

.agent-btn--search {
  background: var(--primary);
  color: #ffffff;
  border: 1px solid var(--primary-strong);
  box-shadow: 0 1px 2px rgba(0, 56, 48, 0.18);
}

.agent-btn--search:hover {
  background: var(--primary-strong);
  filter: none;
  color: #fff;
}

.agent-btn--search:active {
  transform: translateY(1px);
}

/* ——— 11. Chips & pills ——— */

.chip {
  font-weight: 650;
  border-radius: 999px;
}

.chip:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.chip.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 3px 10px -3px rgba(0, 77, 67, 0.45);
}

.dash-pill {
  border-radius: 8px;
  font-weight: 600;
}

/* ——— 12. Modal & dialog ——— */

dialog {
  border: 0;
  border-radius: 20px;
  box-shadow: 0 4px 8px rgba(33, 37, 41, 0.06), 0 40px 90px -24px rgba(33, 37, 41, 0.4);
  padding: 0;
}

dialog::backdrop {
  background: rgba(18, 33, 27, 0.45);
  backdrop-filter: blur(6px);
}

.modal-close {
  transition: background var(--transition), color var(--transition), transform var(--transition);
}

.modal-close:hover {
  transform: rotate(90deg);
}

/* ——— 13. Tickets (keep clean list/thread; no pill chrome) ——— */

.ticket-room {
  animation: stratum-panel-in 220ms cubic-bezier(0.22, 1, 0.36, 1);
}

@media (prefers-reduced-motion: reduce) {
  .ticket-room {
    animation: none !important;
  }

  .ticket-thread {
    scroll-behavior: auto;
  }
}

/* ——— 14. Motion ——— */

@keyframes stratum-panel-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes stratum-card-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.tab-panel {
  animation: stratum-panel-in 260ms cubic-bezier(0.22, 1, 0.36, 1);
}

.corpus-list > .tile,
.card-list > * {
  animation: stratum-card-in 300ms cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

.corpus-list > .tile:nth-child(2),
.card-list > *:nth-child(2) { animation-delay: 40ms; }
.corpus-list > .tile:nth-child(3),
.card-list > *:nth-child(3) { animation-delay: 80ms; }
.corpus-list > .tile:nth-child(4),
.card-list > *:nth-child(4) { animation-delay: 120ms; }
.corpus-list > .tile:nth-child(5),
.card-list > *:nth-child(5) { animation-delay: 160ms; }
.corpus-list > .tile:nth-child(6),
.card-list > *:nth-child(6) { animation-delay: 200ms; }
.corpus-list > .tile:nth-child(n+7),
.card-list > *:nth-child(n+7) { animation-delay: 240ms; }

.dash-metric {
  animation: stratum-card-in 300ms cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

.dash-metric:nth-child(2) { animation-delay: 50ms; }
.dash-metric:nth-child(3) { animation-delay: 100ms; }
.dash-metric:nth-child(4) { animation-delay: 150ms; }
.dash-metric:nth-child(5) { animation-delay: 200ms; }

.auth-shell {
  animation: stratum-panel-in 380ms cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

@media (prefers-reduced-motion: reduce) {
  .tab-panel,
  .corpus-list > .tile,
  .card-list > *,
  .dash-metric,
  .auth-shell {
    animation: none;
  }

  * {
    transition-duration: 0.01ms !important;
  }
}

/* Checkbox rows in admin forms — inline, not stretched grid */
.admin-form label.check,
.admin-form label:has(input[type="checkbox"]) {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.55rem;
  font-weight: 600;
  color: var(--text);
}

.admin-form label.check input[type="checkbox"],
.admin-form label:has(input[type="checkbox"]) input[type="checkbox"] {
  width: 1.05rem;
  height: 1.05rem;
  margin: 0;
  accent-color: var(--primary);
  flex-shrink: 0;
}

/* ══════════════════════════════════════════════════════════════
   STRATUM — Dashboard "radar" upgrade (portal + admin)
   ══════════════════════════════════════════════════════════════ */

/* ——— Hero with radar aside ——— */

.dash-hero--rich {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem 2rem;
  padding: 1.55rem 1.7rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background:
    radial-gradient(680px 240px at 108% -30%, rgba(23, 182, 164, 0.1), transparent 62%),
    linear-gradient(180deg, #ffffff 0%, #fbfcff 100%);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  position: relative;
}

.dash-hero--rich .dash-hero-copy {
  max-width: 44rem;
  min-width: 0;
}

.dash-hero--rich .dash-eyebrow {
  color: var(--primary);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  margin-bottom: 0.55rem;
}

.dash-hero--rich .dash-title {
  font-size: clamp(1.55rem, 2.4vw, 1.9rem);
  font-weight: 780;
  letter-spacing: -0.045em;
}

.dash-hero--rich .dash-hero-line {
  margin-bottom: 0.5rem;
}

.dash-hero--rich .dash-lede {
  font-size: 0.92rem;
  max-width: 46ch;
}

.dash-hero--rich .dash-pill-row {
  margin-top: 0.85rem;
}

.dash-radar {
  display: flex;
  align-items: center;
  gap: 1.15rem;
  flex-shrink: 0;
  padding: 1rem 1.3rem;
  border-radius: 16px;
  background:
    radial-gradient(300px 140px at 120% -20%, rgba(193, 247, 105, 0.22), transparent 65%),
    linear-gradient(160deg, #12211b 0%, #1a2823 100%);
  color: #eef2ef;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    0 14px 34px -16px rgba(18, 33, 27, 0.55);
}

.dash-radar-item {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.dash-radar-icon {
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: rgba(193, 247, 105, 0.15);
  color: #b6e24a;
  flex-shrink: 0;
}

.dash-radar-icon svg {
  width: 1.15rem;
  height: 1.15rem;
}

.dash-radar-icon--warn {
  background: rgba(251, 191, 36, 0.13);
  color: #fcd34d;
}

.dash-radar-copy strong {
  display: block;
  font-size: 1.4rem;
  font-weight: 780;
  letter-spacing: -0.035em;
  line-height: 1.05;
  color: #fff;
  font-variant-numeric: tabular-nums;
}

.dash-radar-copy span {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.7rem;
  font-weight: 600;
  color: rgba(238, 242, 239, 0.62);
  white-space: nowrap;
}

.dash-radar-sep {
  width: 1px;
  align-self: stretch;
  background: rgba(255, 255, 255, 0.1);
}

@media (max-width: 900px) {
  .dash-hero--rich {
    flex-direction: column;
    align-items: stretch;
  }

  .dash-radar {
    justify-content: space-around;
  }
}

/* ——— Rich metric cards ——— */

.dash-metric--rich {
  gap: 0.2rem;
  padding: 1rem 1.1rem 1.05rem;
  border-radius: 0;
  box-shadow: none;
}

.dash-metric--rich .dash-metric-top {
  order: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin-bottom: 0.6rem;
}

.dash-metric-icon {
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 11px;
  display: grid;
  place-items: center;
}

.dash-metric-icon svg {
  width: 1.12rem;
  height: 1.12rem;
}

.dash-metric-icon--indigo { background: var(--primary-soft); color: var(--primary); }
.dash-metric-icon--sky { background: rgba(2, 132, 199, 0.1); color: #0284c7; }
.dash-metric-icon--emerald { background: rgba(4, 120, 87, 0.1); color: #047857; }
.dash-metric-icon--violet { background: rgba(0, 77, 67, 0.09); color: #004d43; }
.dash-metric-icon--slate { background: rgba(71, 85, 105, 0.09); color: #475569; }

.dash-metric-arrow {
  color: var(--primary);
  opacity: 0;
  transform: translateX(-5px);
  transition: opacity var(--transition), transform var(--transition);
}

.dash-metric-arrow svg {
  width: 1rem;
  height: 1rem;
  display: block;
}

.dash-metric:hover .dash-metric-arrow {
  opacity: 1;
  transform: translateX(0);
}

.dash-metric--rich .dash-metric-value {
  order: 1;
  font-size: 1.9rem;
  font-weight: 780;
}

.dash-metric--rich .dash-metric-label {
  order: 2;
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
  color: var(--muted);
}

.dash-metric--rich .dash-metric-sub {
  order: 3;
  margin-top: 0.1rem;
}

/* ——— Deadline table: date chip + urgency pill ——— */

.dash-deadline-head,
.dash-deadline-row {
  grid-template-columns: 5.25rem 6.5rem minmax(0, 1.6fr) minmax(0, 0.9fr) 5.9rem;
}

.dash-deadline-row {
  padding: 0.6rem 1.15rem;
  transition: background var(--transition);
}

.dd-datechip {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 2.7rem;
  padding: 0.32rem 0.5rem;
  border-radius: 10px;
  background: var(--surface-2);
  border: 1px solid var(--line);
}

.dd-datechip strong {
  font-size: 0.98rem;
  font-weight: 780;
  letter-spacing: -0.02em;
  line-height: 1.05;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.dd-datechip span {
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.dd-datechip--empty {
  color: var(--muted);
  font-weight: 600;
}

.dash-deadline-row.is-critical .dd-datechip {
  background: #fef2f2;
  border-color: rgba(180, 35, 24, 0.18);
}

.dash-deadline-row.is-soon .dd-datechip {
  background: #fff7ed;
  border-color: rgba(180, 83, 9, 0.2);
}

.dd-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  padding: 0.24rem 0.58rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 750;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.dd-pill::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 99px;
  background: currentColor;
}

.dd-pill--critical { background: #fef2f2; color: #b42318; border: 1px solid rgba(180, 35, 24, 0.16); }
.dd-pill--soon { background: #fff7ed; color: #b45309; border: 1px solid rgba(180, 83, 9, 0.18); }
.dd-pill--mid { background: var(--primary-soft); color: var(--primary); border: 1px solid rgba(0, 77, 67, 0.16); }
/* Closed / past — violet (archived tone, distinct from muted grey) */
.dd-pill--closed { background: #f5f3ff; color: #5b21b6; border: 1px solid rgba(109, 40, 217, 0.2); }

.dd-delay {
  text-align: right;
}

/* ——— Panel headers with icon ——— */

.dash-panel-icon {
  width: 1.65rem;
  height: 1.65rem;
  border-radius: 8px;
  display: inline-grid;
  place-items: center;
  background: var(--primary-soft);
  color: var(--primary);
  flex-shrink: 0;
}

.dash-panel-icon svg {
  width: 0.95rem;
  height: 0.95rem;
}

.dash-panel-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
}

.dash-panel-cta-arrow {
  width: 0.85rem;
  height: 0.85rem;
  transition: transform var(--transition);
}

.dash-panel-cta:hover .dash-panel-cta-arrow {
  transform: translateX(2px);
}

/* ——— Rows: avatar + trailing pill + chevron ——— */

.dash-row {
  gap: 0.7rem;
  border-radius: 10px;
  transition: background var(--transition), box-shadow var(--transition);
}

.dash-row:hover {
  background: var(--surface-2);
}

.dash-row-ava {
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 9px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(145deg, #c5e4db, #e2e6fd);
  color: var(--primary);
  border: 1px solid rgba(0, 77, 67, 0.14);
}

.dash-row-ava--logo {
  background: #fff;
  padding: 0.15rem;
  overflow: hidden;
}

.dash-row-ava--logo img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

.dash-row-trailing {
  max-width: 8.5rem;
}

.dash-row-trailing .dd-pill {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dash-row-chevron {
  flex-shrink: 0;
  color: var(--primary);
  opacity: 0;
  transform: translateX(-5px);
  transition: opacity var(--transition), transform var(--transition);
}

.dash-row-chevron svg {
  width: 0.9rem;
  height: 0.9rem;
  display: block;
}

.dash-row:hover .dash-row-chevron {
  opacity: 1;
  transform: translateX(0);
}

.dash-row:hover .dash-row-title {
  color: var(--primary-strong);
}

/* ——— Empty states ——— */

.dash-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
  padding: 1.9rem 1.5rem;
  text-align: center;
}

.dash-empty-icon {
  width: 2.3rem;
  height: 2.3rem;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: var(--primary-soft);
  color: var(--primary);
  margin-bottom: 0.15rem;
}

.dash-empty-icon svg {
  width: 1.15rem;
  height: 1.15rem;
}

.dash-empty p {
  margin: 0;
}

.dash-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.dash-link-arrow {
  width: 0.85rem;
  height: 0.85rem;
  transition: transform var(--transition);
}

.dash-link:hover .dash-link-arrow {
  transform: translateX(2px);
}

/* ═══════════════════════════════════════════════════════════════════
   STRATUM v2 — Dashboard "command deck" finish
   Dark hero + glass radar, solid gradient metric icons, type pills.
   Appended last: wins the cascade at equal specificity.
   ═══════════════════════════════════════════════════════════════════ */

/* ——— Dark hero ——— */

.dash-hero--rich {
  border: 1px solid rgba(193, 247, 105, 0.22);
  background:
    radial-gradient(720px 300px at 96% -60%, rgba(193, 247, 105, 0.35), transparent 62%),
    radial-gradient(560px 260px at -8% 130%, rgba(56, 189, 248, 0.16), transparent 60%),
    linear-gradient(155deg, #12211b 0%, #1a2823 52%, #313a37 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 22px 48px -24px rgba(18, 33, 27, 0.55);
  color: #c5e4db;
}

.dash-hero--rich::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: radial-gradient(520px 240px at 88% 0%, #000 0%, transparent 78%);
  pointer-events: none;
}

.dash-hero--rich > * {
  position: relative;
  z-index: 1;
}

.dash-hero--rich .dash-eyebrow {
  color: #b6e24a;
}

.dash-hero--rich .dash-title {
  color: #ffffff;
  text-shadow: 0 2px 18px rgba(23, 182, 164, 0.35);
}

.dash-hero--rich .dash-lede {
  color: rgba(232, 235, 255, 0.72);
}

/* Hero pills → glass */
.dash-hero--rich .dash-pill {
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #eef2ef;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.dash-hero--rich .dash-pill--muted {
  color: rgba(238, 242, 239, 0.66);
}

.dash-hero--rich .dash-pill--warn {
  background: rgba(251, 191, 36, 0.14);
  border-color: rgba(251, 191, 36, 0.32);
  color: #fde68a;
}

.dash-hero--rich .dash-pill--ok {
  background: rgba(52, 211, 153, 0.13);
  border-color: rgba(52, 211, 153, 0.3);
  color: #a7f3d0;
}

/* Radar → glass panel on the dark hero */
.dash-hero--rich .dash-radar {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.13);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 16px 36px -18px rgba(0, 0, 0, 0.5);
}

.dash-hero--rich .dash-radar-icon {
  background: rgba(193, 247, 105, 0.2);
  color: #a8ddd4;
}

.dash-hero--rich .dash-radar-icon--warn {
  background: rgba(251, 191, 36, 0.16);
  color: #fcd34d;
}

/* ——— Metric strip cells: solid gradient icon chips (no float lift) ——— */

.dash-metric--rich {
  transition: background var(--transition), color var(--transition);
}

.dash-metric--rich:hover {
  transform: none;
  border-color: transparent;
  box-shadow: none;
  background: color-mix(in srgb, var(--primary) 5%, var(--surface));
}

.dash-metric-icon {
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 12px;
  color: #ffffff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.dash-metric-icon svg {
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.18));
}

.dash-metric-icon--indigo {
  background: linear-gradient(135deg, #17b6a4 0%, #004d43 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 8px 18px -8px rgba(0, 77, 67, 0.55);
}

.dash-metric-icon--sky {
  background: linear-gradient(135deg, #0ea5e9 0%, #0369a1 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 8px 18px -8px rgba(2, 132, 199, 0.55);
}

.dash-metric-icon--emerald {
  background: linear-gradient(135deg, #10b981 0%, #047857 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 8px 18px -8px rgba(4, 120, 87, 0.55);
}

.dash-metric-icon--violet {
  background: linear-gradient(135deg, #17b6a4 0%, #004d43 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 8px 18px -8px rgba(0, 77, 67, 0.55);
}

.dash-metric-icon--slate {
  background: linear-gradient(135deg, #64748b 0%, #475569 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 8px 18px -8px rgba(71, 85, 105, 0.5);
}

/* ——— Deadline "Type" column → tinted pill ——— */

.dd-type {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  padding: 0.2rem 0.58rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  border: 1px solid transparent;
  white-space: nowrap;
}

.dd-type--tender {
  background: rgba(2, 132, 199, 0.09);
  border-color: rgba(2, 132, 199, 0.2);
  color: #0369a1;
}

.dd-type--subsidy {
  background: rgba(4, 120, 87, 0.09);
  border-color: rgba(4, 120, 87, 0.2);
  color: #047857;
}

/* Mobile radar: allow labels to wrap so nothing clips */
@media (max-width: 900px) {
  .dash-radar {
    gap: 0.8rem;
    padding: 0.9rem 1rem;
  }

  .dash-radar-copy span {
    white-space: normal;
    line-height: 1.25;
  }
}

/* ═══════════════════════════════════════════════════════════════════
   STRATUM — Corpus pages (Marchés / Financements / Actualités)
   Reuses the dashboard "command deck" language: dark hero + glass
   radar, calendar date chips, urgency pills, hover lift. Appended
   last: wins the cascade at equal specificity.
   ═══════════════════════════════════════════════════════════════════ */

/* ——— Corpus hero: dashboard hero, slightly tighter, per-page accent ——— */

.corpus-hero {
  padding: 1.3rem 1.5rem;
  margin-bottom: 0;
}

.corpus-hero .dash-hero-line {
  margin-bottom: 0.35rem;
}

.corpus-hero .dash-title {
  font-size: clamp(1.3rem, 2vw, 1.55rem);
}

.corpus-hero .dash-lede {
  max-width: 58ch;
  font-size: 0.88rem;
}

.corpus-hero .dash-radar-copy strong {
  font-size: 1.25rem;
}

.corpus-hero .dash-radar-copy span {
  max-width: 11rem;
}

/* Marchés — sky accent */
.corpus-hero--tenders {
  border-color: rgba(56, 189, 248, 0.24);
  background:
    radial-gradient(720px 300px at 96% -60%, rgba(56, 189, 248, 0.32), transparent 62%),
    radial-gradient(560px 260px at -8% 130%, rgba(23, 182, 164, 0.2), transparent 60%),
    linear-gradient(155deg, #12211b 0%, #111736 52%, #1a2823 100%);
}

.corpus-hero--tenders .dash-eyebrow {
  color: #7dd3fc;
}

.corpus-hero--tenders .dash-radar-icon {
  background: rgba(56, 189, 248, 0.16);
  color: #7dd3fc;
}

/* Financements — emerald accent */
.corpus-hero--subsidies {
  border-color: rgba(52, 211, 153, 0.24);
  background:
    radial-gradient(720px 300px at 96% -60%, rgba(52, 211, 153, 0.28), transparent 62%),
    radial-gradient(560px 260px at -8% 130%, rgba(23, 182, 164, 0.18), transparent 60%),
    linear-gradient(155deg, #12211b 0%, #0f1a30 52%, #12211b 100%);
}

.corpus-hero--subsidies .dash-eyebrow {
  color: #6ee7b7;
}

.corpus-hero--subsidies .dash-radar-icon {
  background: rgba(52, 211, 153, 0.15);
  color: #6ee7b7;
}

/* Veille — violet accent */
.corpus-hero--news {
  border-color: rgba(23, 182, 164, 0.26);
  background:
    radial-gradient(720px 300px at 96% -60%, rgba(23, 182, 164, 0.32), transparent 62%),
    radial-gradient(560px 260px at -8% 130%, rgba(56, 189, 248, 0.14), transparent 60%),
    linear-gradient(155deg, #12211b 0%, #151638 52%, #1a2823 100%);
}

.corpus-hero--news .dash-eyebrow {
  color: #7dd3c8;
}

.corpus-hero--news .dash-radar-icon {
  background: rgba(23, 182, 164, 0.17);
  color: #7dd3c8;
}

/* Urgency ("warn") radar icon keeps its amber tone on every accent */
.corpus-hero .dash-radar-icon--warn {
  background: rgba(251, 191, 36, 0.16);
  color: #fcd34d;
}

/* ——— Corpus filter bar (kind chips, interest filter) ——— */

.corpus-filterbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.85rem;
  padding: 0 0.15rem;
}

.corpus-filterbar-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
}

.corpus-filterbar .chip-row {
  margin: 0;
}

.corpus-filterbar .chip {
  padding: 0.4rem 0.85rem;
  font-size: 0.8rem;
  transition: background var(--transition), border-color var(--transition),
    color var(--transition), box-shadow var(--transition);
}

.corpus-filterbar .chip:hover:not(.active) {
  border-color: var(--border-strong);
  background: var(--surface-2);
}

.corpus-filterbar .chip.active {
  box-shadow: 0 0 0 3px rgba(0, 77, 67, 0.12);
}

/* Shared interest prefilter (wireCorpusTab) on marchés / financements / actualités */
.corpus-filterbar--interests {
  flex-direction: column;
  align-items: stretch;
  gap: 0.55rem;
  padding: 0.65rem 0.85rem;
  border-radius: 12px;
  background: color-mix(in srgb, var(--surface-2, #f4f5f8) 88%, transparent);
  border: 1px solid var(--line, #e2e6ef);
}

.corpus-filterbar--interests.corpus-filterbar--prefiltered {
  border-color: color-mix(in srgb, var(--primary, #004d43) 35%, var(--line));
  background: color-mix(in srgb, var(--primary, #004d43) 6%, var(--surface, #fff));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--primary, #004d43) 10%, transparent);
}

.corpus-filterbar-main {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.75rem;
}

.corpus-interest-link {
  margin-left: auto;
  border: none;
  background: none;
  padding: 0.2rem 0.1rem;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 650;
  color: var(--primary, #004d43);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.corpus-interest-link:hover,
.corpus-interest-link:focus-visible {
  color: var(--primary-strong, #004d43);
  outline: none;
}

.corpus-interest-empty {
  margin: 0;
  font-size: 0.82rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.6rem;
}

/* Active interest legend under Mes intérêts */
.interest-scope-legend {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.45rem 0.15rem 0.15rem;
  border-top: 1px dashed color-mix(in srgb, var(--line) 80%, transparent);
}

.interest-scope-legend__title {
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--primary, #004d43);
}

.interest-scope-legend--off .interest-scope-legend__title {
  color: var(--muted);
}

.interest-active-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.interest-active-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 650;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink, #1a1d24);
}

.interest-active-chip--on {
  border-color: color-mix(in srgb, var(--primary, #004d43) 40%, var(--line));
  background: color-mix(in srgb, var(--primary, #004d43) 12%, var(--surface));
  color: var(--primary, #004d43);
}

.interest-scope-channels {
  margin: 0.15rem 0 0;
  padding: 0 0 0 1.1rem;
  font-size: 0.78rem;
  color: var(--ink, #1a1d24);
  line-height: 1.4;
}

.interest-scope-channels li {
  margin: 0.1rem 0;
}

.interest-scope-hint {
  margin: 0.15rem 0 0;
  font-size: 0.75rem;
}

/* Per-card: why Mes intérêts kept this fiche */
.interest-match-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin: 0.35rem 0 0.25rem;
}

.interest-match-chip {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 0.15rem 0.5rem;
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: 650;
  line-height: 1.25;
  color: var(--primary, #004d43);
  background: color-mix(in srgb, var(--primary, #004d43) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--primary, #004d43) 22%, transparent);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.size-fit-chip {
  display: inline-flex;
  margin: 0.25rem 0.3rem 0.25rem 0;
  padding: 0.15rem 0.5rem;
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: 650;
  color: #1a4d7a;
  background: color-mix(in srgb, #2b6cb0 12%, transparent);
  border: 1px solid color-mix(in srgb, #2b6cb0 28%, transparent);
}

/* Ma fiche — private metrics */
.ma-fiche-private {
  margin-top: 0.75rem;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  border: 1px dashed color-mix(in srgb, var(--primary, #004d43) 35%, var(--line));
  background: color-mix(in srgb, var(--primary, #004d43) 5%, var(--surface));
}

.ma-fiche-private legend {
  font-weight: 750;
  padding: 0 0.35rem;
}

.ma-fiche-private-uses {
  margin: 0.25rem 0 0.75rem;
  padding-left: 1.2rem;
  font-size: 0.82rem;
  line-height: 1.4;
}

.ma-fiche-private-cotisation {
  margin: 0.5rem 0 0;
  font-size: 0.8rem;
  grid-column: 1 / -1;
}

/* ——— Corpus tiles: dashboard hover lift + date chip rail ——— */

.corpus-tile {
  transition: transform var(--transition), box-shadow var(--transition),
    border-color var(--transition), background var(--transition);
}

.corpus-tile:hover {
  transform: translateY(-2px);
  border-color: rgba(0, 77, 67, 0.28);
  box-shadow: var(--shadow-md);
  background: var(--surface);
}

.corpus-tile:hover .tile-title {
  color: var(--primary-strong);
}

.corpus-tile .tile-side {
  align-items: center;
  gap: 0.45rem;
  min-width: 3rem;
  padding-top: 0.15rem;
}

/* Same urgency tint as the dashboard deadline rows, on tile context */
.corpus-tile.is-critical .dd-datechip {
  background: #fef2f2;
  border-color: rgba(180, 35, 24, 0.18);
}

.corpus-tile.is-soon .dd-datechip {
  background: #fff7ed;
  border-color: rgba(180, 83, 9, 0.2);
}

/* Closed — violet datechip */
.corpus-tile.is-closed .dd-datechip {
  background: #f5f3ff;
  border-color: rgba(109, 40, 217, 0.2);
}

.corpus-tile.is-closed .dd-datechip strong {
  color: #5b21b6;
}

.dash-deadline-row.is-closed .dd-datechip {
  background: #f5f3ff;
  border-color: rgba(109, 40, 217, 0.2);
}

.dash-deadline-row.is-closed .dd-datechip strong {
  color: #5b21b6;
}

/*
 * Status card wash — light L→R gradient for every urgency tone.
 * Soft tint on the left, white on the right (same recipe, different hue).
 */
.corpus-tile.is-critical {
  border-color: color-mix(in srgb, #b42318 18%, var(--line));
  background: linear-gradient(
    90deg,
    color-mix(in srgb, #b42318 7%, #fff) 0%,
    #ffffff 78%
  );
}

.corpus-tile.is-soon {
  border-color: color-mix(in srgb, #b45309 18%, var(--line));
  background: linear-gradient(
    90deg,
    color-mix(in srgb, #b45309 7%, #fff) 0%,
    #ffffff 78%
  );
}

.corpus-tile.is-mid {
  border-color: color-mix(in srgb, var(--primary) 16%, var(--line));
  background: linear-gradient(
    90deg,
    color-mix(in srgb, var(--primary) 7%, #fff) 0%,
    #ffffff 78%
  );
}

.corpus-tile.is-closed {
  border-color: color-mix(in srgb, #7c3aed 18%, var(--line));
  background: linear-gradient(
    90deg,
    color-mix(in srgb, #7c3aed 8%, #fff) 0%,
    #ffffff 78%
  );
}

.corpus-tile.is-critical:hover {
  border-color: color-mix(in srgb, #b42318 30%, var(--line));
  background: linear-gradient(
    90deg,
    color-mix(in srgb, #b42318 11%, #fff) 0%,
    #ffffff 72%
  );
}

.corpus-tile.is-soon:hover {
  border-color: color-mix(in srgb, #b45309 30%, var(--line));
  background: linear-gradient(
    90deg,
    color-mix(in srgb, #b45309 11%, #fff) 0%,
    #ffffff 72%
  );
}

.corpus-tile.is-mid:hover {
  border-color: color-mix(in srgb, var(--primary) 28%, var(--line));
  background: linear-gradient(
    90deg,
    color-mix(in srgb, var(--primary) 11%, #fff) 0%,
    #ffffff 72%
  );
}

.corpus-tile.is-closed:hover {
  border-color: color-mix(in srgb, #7c3aed 30%, var(--line));
  background: linear-gradient(
    90deg,
    color-mix(in srgb, #7c3aed 12%, #fff) 0%,
    #ffffff 72%
  );
}

.corpus-tile .tile-snippet {
  margin-top: 0.1rem;
}

/* Corpus detail (tender / subsidy popup) */
.tile-title-btn {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
}
.tile-title-btn:hover,
.tile-title-btn:focus-visible {
  text-decoration: underline;
  outline: none;
}
.corpus-link--detail {
  border: 0;
  background: none;
  font: inherit;
  cursor: pointer;
  color: inherit;
  padding: 0;
}
.corpus-detail-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1rem;
}
.corpus-detail-section h3 {
  font-size: 0.95rem;
  margin: 1rem 0 0.4rem;
}
.corpus-detail-p {
  white-space: pre-wrap;
  margin: 0 0 0.75rem;
  line-height: 1.45;
}
.corpus-detail-source {
  margin-top: 1.25rem;
}
.corpus-detail-body {
  max-height: min(70vh, 640px);
  overflow: auto;
}


.corpus-tile .tile-foot {
  margin-top: 0.35rem;
}

/* ——— Pill variants in the dd family ——— */

.dd-pill--open {
  background: #ecfdf3;
  color: #067647;
  border: 1px solid rgba(6, 118, 71, 0.16);
}

.dd-pill--signal {
  background: #fff7ed;
  color: #b45309;
  border: 1px solid rgba(180, 83, 9, 0.18);
}

.dd-type--ue {
  background: rgba(0, 77, 67, 0.09);
  border-color: rgba(0, 77, 67, 0.2);
  color: #004d43;
}

/* Kind pill in the tile foot (flex context, not dashboard grid) */
.corpus-tile .tile-foot .dd-type {
  justify-self: auto;
}

/* ——— News source avatar (violet monogram, dashboard row language) ——— */

.corpus-ava {
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 10px;
  font-size: 0.7rem;
  background: linear-gradient(145deg, #f3e8ff, #e6d9fd);
  color: #004d43;
  border-color: rgba(0, 77, 67, 0.18);
}

.corpus-ava--sky {
  background: linear-gradient(145deg, #e0f2fe, #cfe6fa);
  color: #0369a1;
  border-color: rgba(2, 132, 199, 0.18);
}

.corpus-ava--emerald {
  background: linear-gradient(145deg, #d1fae5, #c6efdd);
  color: #047857;
  border-color: rgba(4, 120, 87, 0.18);
}

/* Closed marchés monogram — violet (matches is-closed pill/chip) */
.corpus-ava--violet {
  background: linear-gradient(145deg, #f5f3ff, #ede9fe);
  color: #5b21b6;
  border-color: rgba(109, 40, 217, 0.2);
}

/* ——— Tile foot external link (single ↗ via .tile-link::after) ——— */

.corpus-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  text-decoration: none;
  /* Isolate from title-row actions; never cover them */
  position: relative;
  z-index: 0;
  flex: 0 0 auto;
  max-width: 100%;
}

/* Foot link sits on its own line end; don't let it stretch over the card */
.corpus-tile .tile-foot .tile-link {
  margin-left: auto;
  pointer-events: auto;
}

/* ——— Empty state: dash-empty framed as a dashed card ——— */

.corpus-list > .dash-empty {
  align-items: center;
  gap: 0.55rem;
  padding: 2rem 1.5rem;
  text-align: center;
  background: var(--surface);
  border: 1px dashed var(--line);
  border-radius: var(--radius-md);
}

/* ——— Subsidy details accordion ——— */

.corpus-tile .tile-details summary {
  color: var(--primary);
  transition: color var(--transition);
}

.corpus-tile .tile-details summary:hover {
  color: var(--primary-strong);
}

/* ——— Responsive ——— */

@media (max-width: 640px) {
  .corpus-hero {
    padding: 1.1rem 1.05rem;
  }

  .corpus-hero .dash-radar {
    align-self: stretch;
  }

  .corpus-filterbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.4rem;
  }
}

/* ——— News Avenia (member + shared accents) ———
   Pole announcements — indigo brand (distinct from violet sector veille). */

/* Tab hero — deep indigo, not violet corpus-news */
.cluster-news-hero {
  margin-bottom: 1.35rem;
  border-color: rgba(193, 247, 105, 0.28);
  background:
    radial-gradient(720px 300px at 96% -55%, rgba(23, 182, 164, 0.38), transparent 62%),
    radial-gradient(520px 240px at -6% 120%, rgba(56, 189, 248, 0.12), transparent 58%),
    linear-gradient(155deg, #12211b 0%, #313a37 48%, #1a2823 100%);
}

.cluster-news-hero .dash-eyebrow {
  color: #17b6a4;
}

.cluster-news-hero .dash-radar-icon {
  background: rgba(193, 247, 105, 0.18);
  color: #9fd4c8;
}

.cluster-news-hero .dash-radar-icon svg {
  width: 1.15rem;
  height: 1.15rem;
}

.cluster-news-hero.is-detail-mode .dash-lede,
.cluster-news-hero.is-detail-mode .dash-radar {
  display: none;
}

.cluster-news-list {
  display: block;
}

.cluster-news-loading {
  padding: 1.5rem 0.25rem;
}

.cluster-news-empty {
  text-align: center;
  padding: 3rem 1.5rem;
  border: 1px dashed var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.cluster-news-empty-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  margin-bottom: 0.85rem;
  border-radius: 12px;
  background: var(--primary-soft);
  color: var(--primary);
}

.cluster-news-empty-icon svg {
  width: 1.35rem;
  height: 1.35rem;
}

.cluster-news-empty h3 {
  margin: 0 0 0.4rem;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.cluster-news-empty p {
  margin: 0;
  max-width: 36ch;
  margin-inline: auto;
}

/* List grid */
.cluster-news-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(288px, 1fr));
  gap: 1.1rem;
}

.cluster-news-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  text-align: left;
  box-shadow: var(--shadow-sm);
  transition:
    box-shadow var(--transition),
    border-color var(--transition),
    transform var(--transition);
}

.cluster-news-card:hover,
.cluster-news-card:focus-visible {
  border-color: rgba(0, 77, 67, 0.35);
  box-shadow: var(--shadow-md);
  outline: none;
}

@media (prefers-reduced-motion: no-preference) {
  .cluster-news-card:hover {
    transform: translateY(-2px);
  }
}

.cluster-news-card.is-lead {
  border-color: rgba(0, 77, 67, 0.22);
}

.cluster-news-card-media {
  position: relative;
  aspect-ratio: 16 / 10;
  background:
    radial-gradient(120% 100% at 10% 0%, rgba(23, 182, 164, 0.22), transparent 55%),
    linear-gradient(145deg, #c5e4db 0%, #b7dcd2 55%, #9fd4c8 100%);
  overflow: hidden;
}

.cluster-news-card-media.is-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
}

.cluster-news-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 280ms cubic-bezier(0.4, 0, 0.2, 1);
}

@media (prefers-reduced-motion: no-preference) {
  .cluster-news-card:hover .cluster-news-card-media img {
    transform: scale(1.03);
  }
}

.cluster-news-card-mono {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--primary);
  opacity: 0.85;
}

.cluster-news-card-body {
  padding: 1.05rem 1.15rem 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  flex: 1;
}

.cluster-news-card-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  /* room for trailing ★ without wrapping over date/badge */
  min-width: 0;
}

.cluster-news-card-date,
.cluster-news-detail-date,
.cluster-news-dash-date {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--primary);
  font-variant-numeric: tabular-nums;
}

.cluster-news-card-badge,
.cluster-news-dash-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--primary-strong);
  background: var(--primary-soft);
}

.cluster-news-card-title {
  margin: 0;
  font-size: 1.08rem;
  font-weight: 750;
  line-height: 1.28;
  letter-spacing: -0.02em;
  color: var(--text);
}

.cluster-news-card-author,
.cluster-news-detail-author {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0.15rem 0 0;
  font-size: 0.84rem;
  color: var(--muted);
}

.cluster-news-author-ava {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.55rem;
  height: 1.55rem;
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #fff;
  background: linear-gradient(145deg, var(--primary), var(--primary-strong));
  flex-shrink: 0;
}

.cluster-news-card-excerpt,
.cluster-news-dash-preview {
  margin: 0.15rem 0 0;
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.cluster-news-card-cta,
.cluster-news-dash-cta {
  align-self: flex-start;
  margin-top: auto;
  padding: 0.55rem 0 0;
  border: 0;
  background: none;
  color: var(--primary);
  font: inherit;
  font-weight: 650;
  font-size: 0.88rem;
  cursor: pointer;
}

.cluster-news-card-cta:hover,
.cluster-news-dash-cta:hover {
  color: var(--primary-strong);
}

/* Detail / article — full stage width (not a centered narrow column) */
.cluster-news-detail {
  margin-top: 0.15rem;
  width: 100%;
  max-width: none;
}

.cluster-news-article {
  max-width: none;
  width: 100%;
  margin: 0;
  padding: 1.35rem clamp(1.25rem, 2.5vw, 2rem) 2rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.cluster-news-back {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: 0;
  background: transparent;
  color: var(--primary);
  font: inherit;
  font-weight: 650;
  font-size: 0.88rem;
  cursor: pointer;
  padding: 0.25rem 0.35rem 0.25rem 0;
  margin: 0 0 1.15rem;
  border-radius: 6px;
}

.cluster-news-back:hover {
  background: var(--primary-ghost);
  color: var(--primary-strong);
}

.cluster-news-article-head {
  margin-bottom: 1.25rem;
}

.cluster-news-article-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 0.65rem;
}

.cluster-news-article-dot {
  width: 4px;
  height: 4px;
  border-radius: 999px;
  background: var(--border-strong);
}

.cluster-news-article-kind {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}

.cluster-news-detail-title {
  margin: 0 0 0.85rem;
  font-size: clamp(1.45rem, 2.4vw, 1.85rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.03em;
  color: var(--text);
}

.cluster-news-detail-author-text {
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
  line-height: 1.25;
}

.cluster-news-detail-author-text strong {
  font-size: 0.92rem;
  font-weight: 650;
  color: var(--text);
}

.cluster-news-detail-author-text .muted {
  font-size: 0.78rem;
}

.cluster-news-detail-figure {
  margin: 0 0 1.35rem;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--surface-2);
  border: 1px solid var(--line);
}

.cluster-news-detail-figure img {
  width: 100%;
  max-height: min(56vh, 560px);
  object-fit: cover;
  display: block;
}

.cluster-news-detail-body {
  max-width: none;
  width: 100%;
  font-size: 1.02rem;
  line-height: 1.7;
  color: var(--text);
  white-space: pre-wrap;
}

/* Accueil section */
.dash-section--cluster-news {
  margin-bottom: 1.25rem;
  overflow: visible;
}

.dash-section-head--cluster-news {
  background:
    linear-gradient(90deg, rgba(0, 77, 67, 0.05), transparent 55%),
    var(--surface);
}

.dash-section-head-main {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  min-width: 0;
}

.cluster-news-section-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.15rem;
  height: 2.15rem;
  border-radius: 10px;
  background: var(--primary-soft);
  color: var(--primary);
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.cluster-news-section-icon svg {
  width: 1.1rem;
  height: 1.1rem;
}

.cluster-news-dash-body {
  padding: 1rem 1.1rem 1.15rem;
  background: linear-gradient(180deg, #eef0eb 0%, var(--surface) 100%);
}

.cluster-news-dash-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.85rem;
}

.cluster-news-dash-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  padding: 0;
  overflow: hidden;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition:
    border-color var(--transition),
    box-shadow var(--transition),
    transform var(--transition);
}

.cluster-news-dash-card.is-featured {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(140px, 0.9fr) minmax(0, 1.4fr);
  min-height: 168px;
}

@media (max-width: 720px) {
  .cluster-news-dash-card.is-featured {
    grid-template-columns: 1fr;
  }
}

.cluster-news-dash-card:hover {
  border-color: rgba(0, 77, 67, 0.35);
  box-shadow: var(--shadow-md);
}

@media (prefers-reduced-motion: no-preference) {
  .cluster-news-dash-card:hover {
    transform: translateY(-1px);
  }
}

.cluster-news-dash-media {
  position: relative;
  min-height: 96px;
  background:
    radial-gradient(100% 90% at 20% 0%, rgba(23, 182, 164, 0.2), transparent 60%),
    linear-gradient(145deg, #c5e4db, #b7dcd2);
  overflow: hidden;
}

.cluster-news-dash-card.is-featured .cluster-news-dash-media {
  min-height: 100%;
  aspect-ratio: auto;
}

.cluster-news-dash-card:not(.is-featured) .cluster-news-dash-media {
  aspect-ratio: 16 / 9;
}

.cluster-news-dash-media.is-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
}

.cluster-news-dash-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.cluster-news-dash-mono {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.03em;
}

.cluster-news-dash-card-body {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.9rem 1rem 1rem;
  min-width: 0;
  flex: 1;
}

.cluster-news-dash-meta-row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.cluster-news-dash-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 750;
  line-height: 1.3;
  letter-spacing: -0.02em;
  color: var(--text);
}

.cluster-news-dash-card.is-featured .cluster-news-dash-title {
  font-size: 1.2rem;
}

.cluster-news-dash-author {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
  font-size: 0.82rem;
  color: var(--muted);
}

.cluster-news-author-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--primary);
  opacity: 0.55;
  flex-shrink: 0;
}

.cluster-news-dash-preview {
  -webkit-line-clamp: 2;
}

.cluster-news-dash-card.is-featured .cluster-news-dash-preview {
  -webkit-line-clamp: 3;
}

/* Admin catalog accents (shared) */
.tab-eyebrow--cluster-news {
  color: var(--primary);
}

.admin-row-avatar--cluster-news {
  background: linear-gradient(145deg, var(--primary), var(--primary-strong));
  color: #c5e4db;
}

.cluster-news-image-preview-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-top: 0.25rem;
}

.cluster-news-image-preview {
  max-width: 100%;
  max-height: 220px;
  object-fit: contain;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  padding: 0.25rem;
}

@media (prefers-reduced-motion: reduce) {
  .cluster-news-card,
  .cluster-news-dash-card,
  .cluster-news-card-media img,
  .dash-news-feature-media img,
  .dash-news-side-media img,
  .dash-news-feature,
  .dash-news-side-item {
    transition: none;
  }
}

/* ════════════════════════════════════════════════════════════════════
   Accueil — News Avenia magazine hero (pole-avenia.com Actualités)
   Signature: huge featured photo + side stack. Greeting is a refined
   welcome bar (secondary weight to the news magazine moment).
   ════════════════════════════════════════════════════════════════════ */

.dashboard--avenia-home {
  display: flex;
  flex-direction: column;
  gap: 1.35rem;
}

/* Greeting — soft elevated welcome bar */
.dash-greet {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 1.5rem;
  flex-wrap: wrap;
  padding: 1rem 1.2rem;
  border-radius: var(--radius-lg);
  border: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
  background:
    radial-gradient(520px 160px at 100% 0%, rgba(182, 226, 74, 0.14), transparent 58%),
    radial-gradient(420px 140px at 0% 100%, rgba(0, 77, 67, 0.06), transparent 55%),
    linear-gradient(180deg, #ffffff 0%, #f8faf7 100%);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.85) inset,
    var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.dash-greet::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  border-radius: 0; /* square left edge — no curved AI bar */
  background: linear-gradient(180deg, var(--brand-lime) 0%, var(--brand-teal) 100%);
  opacity: 0.95;
  pointer-events: none;
}

.dash-greet-main {
  display: flex;
  align-items: center;
  gap: 0.95rem;
  min-width: 0;
  flex: 1 1 auto;
  padding-left: 0.35rem;
}

/* Self-member org logo — welcoming mark when the fiche has one */
.dash-greet-logo {
  flex-shrink: 0;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 1rem;
  background:
    linear-gradient(145deg, #fff 0%, #f3f7f4 100%);
  border: 1px solid color-mix(in srgb, var(--primary) 14%, var(--line));
  padding: 0.32rem;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 6px 16px -8px rgba(18, 33, 27, 0.22);
}

.dash-greet-logo img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

.dash-greet-copy {
  min-width: 0;
}

.dash-greet-eyebrow {
  margin: 0 0 0.22rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--primary);
}

.dash-greet-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2.1vw, 1.75rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.12;
  color: var(--text);
}

.dash-greet-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.6rem;
}

/* Deadline radar — dark glass instrument (one dark brand micro-moment) */
.dash-greet-radar {
  display: inline-flex;
  align-items: stretch;
  gap: 0;
  border: 1px solid rgba(193, 247, 105, 0.18);
  border-radius: 999px;
  background:
    radial-gradient(180px 80px at 90% 0%, rgba(193, 247, 105, 0.18), transparent 65%),
    linear-gradient(160deg, #12211b 0%, #1a2823 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 10px 28px -14px rgba(18, 33, 27, 0.55);
  overflow: hidden;
  color: #e8efe9;
}

.dash-greet-radar-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.12rem;
  padding: 0.62rem 1.15rem;
  min-width: 4.65rem;
}

.dash-greet-radar-item strong {
  font-size: 1.22rem;
  font-weight: 780;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  color: #fff;
  letter-spacing: -0.03em;
}

.dash-greet-radar-item span {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: rgba(232, 239, 233, 0.68);
  white-space: nowrap;
}

.dash-greet-radar-item--warn strong {
  color: #fcd34d;
}

.dash-greet-radar-sep {
  width: 1px;
  background: rgba(255, 255, 255, 0.12);
  align-self: stretch;
}

/* News hero section */
.dash-news-hero {
  display: flex;
  flex-direction: column;
  gap: 0.95rem;
  margin: 0;
}

.dash-news-hero-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 0 0.15rem;
}

.dash-news-hero-eyebrow {
  margin: 0 0 0.22rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary);
}

.dash-news-hero-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 2.7vw, 2.1rem);
  font-weight: 750;
  letter-spacing: -0.035em;
  line-height: 1.08;
  color: var(--text);
}

.dash-news-hero-hint {
  margin: 0.32rem 0 0;
  font-size: 0.92rem;
  color: var(--muted);
  max-width: 42ch;
}

.dash-news-hero-all {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  border: 1px solid color-mix(in srgb, var(--primary) 18%, var(--line));
  background:
    linear-gradient(180deg, #ffffff 0%, color-mix(in srgb, var(--primary-soft) 35%, #fff) 100%);
  color: var(--primary);
  font: inherit;
  font-family: var(--font-semibold);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  padding: 0.55rem 0.95rem;
  border-radius: 999px;
  box-shadow: 0 1px 2px rgba(18, 33, 27, 0.05);
  transition:
    color var(--transition),
    background var(--transition),
    border-color var(--transition),
    box-shadow var(--transition),
    transform var(--transition);
}

.dash-news-hero-all:hover {
  color: var(--primary-strong);
  border-color: color-mix(in srgb, var(--primary) 35%, var(--line));
  background: var(--primary-soft);
  box-shadow: 0 4px 14px -6px rgba(0, 77, 67, 0.28);
}

.dash-news-hero-all:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

@media (prefers-reduced-motion: no-preference) {
  .dash-news-hero-all:hover {
    transform: translateY(-1px);
  }
}

.dash-news-hero-body {
  min-width: 0;
}

/* 2/3 featured + 1/3 side stack — mirrors avenia actu_container */
.dash-news-hero-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.85fr) minmax(240px, 1fr);
  gap: 1rem;
  align-items: stretch;
  min-height: clamp(360px, 48vh, 520px);
}

/* Featured: full-bleed photo with text overlay (cinematic) */
.dash-news-feature {
  position: relative;
  display: block;
  width: 100%;
  min-height: clamp(340px, 46vh, 500px);
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: calc(var(--radius-lg) + 2px);
  overflow: hidden;
  cursor: pointer;
  text-align: left;
  color: #fff;
  background: #1a2e28;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.06) inset,
    0 2px 4px rgba(18, 33, 27, 0.06),
    0 22px 48px -20px rgba(18, 33, 27, 0.5);
  transition:
    box-shadow 220ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 220ms cubic-bezier(0.22, 1, 0.36, 1);
}

.dash-news-feature:hover {
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.08) inset,
    0 4px 8px rgba(18, 33, 27, 0.08),
    0 32px 64px -18px rgba(18, 33, 27, 0.58);
}

.dash-news-feature:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring), 0 18px 40px -22px rgba(18, 33, 27, 0.45);
}

@media (prefers-reduced-motion: no-preference) {
  .dash-news-feature:hover {
    transform: translateY(-2px);
  }
}

.dash-news-feature-media {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(120% 90% at 15% 0%, rgba(23, 182, 164, 0.35), transparent 55%),
    linear-gradient(145deg, #0d3d36 0%, #174a42 45%, #0f2f2a 100%);
  overflow: hidden;
}

.dash-news-feature-media.is-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
}

.dash-news-feature-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
  transition: transform 420ms cubic-bezier(0.4, 0, 0.2, 1);
}

@media (prefers-reduced-motion: no-preference) {
  .dash-news-feature:hover .dash-news-feature-media img {
    transform: scale(1.06);
  }
}

.dash-news-feature-mono {
  font-family: var(--font-display);
  font-size: clamp(3rem, 8vw, 5rem);
  font-weight: 700;
  letter-spacing: -0.05em;
  color: rgba(193, 247, 105, 0.55);
  user-select: none;
}

.dash-news-feature-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      180deg,
      rgba(18, 33, 27, 0.08) 0%,
      rgba(18, 33, 27, 0.15) 35%,
      rgba(18, 33, 27, 0.72) 72%,
      rgba(18, 33, 27, 0.92) 100%
    );
  pointer-events: none;
  z-index: 1;
}

.dash-news-feature-copy {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.45rem;
  padding: clamp(1.15rem, 2.5vw, 1.85rem) clamp(1.15rem, 2.5vw, 1.9rem)
    clamp(1.25rem, 2.5vw, 1.75rem);
  max-width: 42rem;
}

.dash-news-feature-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-bottom: 0.15rem;
}

.dash-news-feature-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.22rem 0.65rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #12211b;
  background: var(--brand-lime);
}

.dash-news-feature-date {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.78);
  font-variant-numeric: tabular-nums;
}

.dash-news-feature-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 2.8vw, 2.15rem);
  font-weight: 750;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: #fff;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.35);
}

.dash-news-feature-preview {
  margin: 0.15rem 0 0;
  font-size: 0.95rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.82);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  max-width: 38ch;
}

.dash-news-feature-author {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0.2rem 0 0;
  font-size: 0.86rem;
  color: rgba(255, 255, 255, 0.72);
}

.dash-news-feature-author .cluster-news-author-dot {
  background: var(--brand-lime);
  opacity: 0.9;
}

.dash-news-feature-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.55rem;
  font-family: var(--font-semibold);
  font-weight: 600;
  font-size: 0.88rem;
  color: #12211b;
  background: var(--brand-lime);
  padding: 0.42rem 0.85rem;
  border-radius: 999px;
  box-shadow: 0 2px 10px -2px rgba(182, 226, 74, 0.55);
  transition:
    background 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.dash-news-feature:hover .dash-news-feature-cta {
  color: #12211b;
  background: #d4f98a;
  box-shadow: 0 4px 14px -2px rgba(182, 226, 74, 0.65);
}

@media (prefers-reduced-motion: no-preference) {
  .dash-news-feature:hover .dash-news-feature-cta {
    transform: translateX(2px);
  }
}

/* Side stack */
.dash-news-side {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-height: 0;
  min-width: 0;
}

.dash-news-side-item {
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr);
  gap: 0;
  flex: 1 1 0;
  min-height: 0;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
  border-radius: var(--radius-md);
  background:
    linear-gradient(180deg, #ffffff 0%, #fbfcf9 100%);
  overflow: hidden;
  cursor: pointer;
  text-align: left;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    var(--shadow-sm);
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
}

.dash-news-side-item:hover {
  border-color: color-mix(in srgb, var(--primary) 32%, var(--line));
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.95) inset,
    0 2px 6px rgba(18, 33, 27, 0.06),
    0 16px 32px -14px rgba(0, 77, 67, 0.22);
}

.dash-news-side-item:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

@media (prefers-reduced-motion: no-preference) {
  .dash-news-side-item:hover {
    transform: translateY(-1px);
  }
}

.dash-news-side-media {
  position: relative;
  min-height: 100%;
  background:
    radial-gradient(120% 100% at 10% 0%, rgba(23, 182, 164, 0.22), transparent 55%),
    linear-gradient(145deg, #c5e4db 0%, #b7dcd2 55%, #9fd4c8 100%);
  overflow: hidden;
}

.dash-news-side-media.is-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
}

.dash-news-side-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
  transition: transform 320ms cubic-bezier(0.4, 0, 0.2, 1);
}

@media (prefers-reduced-motion: no-preference) {
  .dash-news-side-item:hover .dash-news-side-media img {
    transform: scale(1.05);
  }
}

.dash-news-side-mono {
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--primary);
  opacity: 0.8;
}

.dash-news-side-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.28rem;
  padding: 0.75rem 0.9rem;
  min-width: 0;
}

.dash-news-side-date {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--primary);
  font-variant-numeric: tabular-nums;
}

.dash-news-side-title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.02em;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.dash-news-side-author {
  margin: 0;
  font-size: 0.78rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* When only featured (no side list), span full width */
.dash-news-hero-layout:not(:has(.dash-news-side)) {
  grid-template-columns: 1fr;
}

.dash-news-hero-layout:not(:has(.dash-news-side)) .dash-news-feature {
  min-height: clamp(380px, 50vh, 540px);
}

@media (max-width: 960px) {
  .dash-news-hero-layout {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .dash-news-feature {
    min-height: clamp(300px, 52vw, 420px);
  }

  .dash-news-side {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 0.75rem;
  }

  .dash-news-side-item {
    flex: none;
    min-height: 112px;
  }
}

@media (max-width: 560px) {
  .dash-greet {
    align-items: stretch;
  }

  .dash-greet-radar {
    width: 100%;
    justify-content: stretch;
  }

  .dash-greet-radar-item {
    flex: 1;
  }

  .dash-news-side-item {
    grid-template-columns: 92px minmax(0, 1fr);
  }

  .dash-news-feature-preview {
    -webkit-line-clamp: 3;
    max-width: none;
  }

  .dash-news-feature-copy {
    max-width: none;
  }
}

/* ════════════════════════════════════════════════════════════════════
   AVENIA brand layer — aligned with pole-avenia.com (theme-avenia)
   Wins the cascade at equal specificity over Stratum defaults.
   ════════════════════════════════════════════════════════════════════ */

/* Brand mark uses real Avenia logos (not the old strata chevrons) */
.brand-symbol {
  width: auto;
  height: 32px;
  border-radius: 0;
  background: transparent !important;
  box-shadow: none !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.brand-symbol img,
.brand-symbol svg {
  display: block;
  width: auto;
  height: 32px;
  max-width: 148px;
}

.brand-symbol--rail img,
.brand-symbol--rail svg,
.rail-brand .brand-symbol img,
.rail-brand .brand-symbol svg {
  height: 28px;
  max-width: 132px;
}

.brand-symbol--auth img,
.brand-symbol--auth svg {
  height: 36px;
  max-width: 160px;
}

.brand-symbol--mark-only {
  width: 34px;
  height: 34px;
}

.brand-symbol--mark-only img,
.brand-symbol--mark-only svg {
  width: 34px;
  height: 34px;
  max-width: none;
}

/* Topbar wordmark: Avenia, not Orvex product name */
.topbar .brand {
  color: var(--text);
  text-transform: none;
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -0.02em;
  font-size: 1.15rem;
  gap: 0.65rem;
}

.topbar .brand > span:last-child {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text);
}

/* Rail = Avenia darkgreen chrome */
.app-rail {
  background:
    radial-gradient(520px 360px at 0% 0%, rgba(193, 247, 105, 0.08), transparent 55%),
    linear-gradient(180deg, #1a2823 0%, #313a37 55%, #2a322f 100%) !important;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
}

.rail-brand strong {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -0.02em;
}

.rail-nav .tab.active,
.app-rail .tab.active {
  background: rgba(255, 255, 255, 0.12) !important;
  color: #fff !important;
  box-shadow: none;
}

.rail-nav .tab:hover:not(.active),
.app-rail .tab:hover:not(.active) {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
}

/* Active pills / chips use lime accent on light surfaces carefully */
.badge:not(.badge-open):not(.badge-warn):not(.badge-closed) {
  background: var(--primary-soft);
  color: var(--primary-strong);
}

/* Primary actions already restyled; ensure dark CTAs match Avenia too */
.btn-secondary {
  border-radius: 3.75rem;
  font-family: var(--font-semibold);
  font-weight: 500;
}

/* Agent search CTA = deep teal + white (app contrast; lime reserved for badges/rail) */
.agent-btn--search {
  background: var(--primary) !important;
  color: #ffffff !important;
  border: 1px solid var(--primary-strong) !important;
  box-shadow: 0 1px 2px rgba(0, 56, 48, 0.18) !important;
  font-family: var(--font-semibold);
  font-weight: 650;
}

.agent-btn--search:hover {
  background: var(--primary-strong) !important;
  filter: none;
  color: #fff !important;
}

.agent-btn--search:disabled {
  opacity: 0.55;
  color: #ffffff !important;
}

/* Auth visual caption accents on dark photo */
.auth-visual-kicker {
  color: #c1f769 !important;
}

.auth-eyebrow {
  color: #b6e24a !important;
}

.auth-points svg {
  color: #b6e24a !important;
}

/* Focus ring brand teal */
:focus-visible {
  box-shadow: var(--focus-ring);
}

/* Score / progress fills use teal ramp */
.score-fill,
[class*="score"] .fill {
  background: linear-gradient(90deg, var(--score-fill-from), var(--score-fill-to));
}

/* Soften remaining violet-tinted cluster/news hero labels */
.cluster-news-tab-hero,
.corpus-hero--cluster {
  --hero-accent: var(--brand-lime);
}

/* Dark command deck / heroes: darkgreen not indigo */
.dash-hero--rich {
  background:
    radial-gradient(600px 280px at 100% 0%, rgba(193, 247, 105, 0.12), transparent 55%),
    linear-gradient(145deg, #12211b 0%, #1a2823 48%, #313a37 100%) !important;
}

/* Inputs: 8px radius like Avenia cards */
input,
select,
textarea {
  border-radius: var(--radius-sm);
}

/* Scrollbar brand-neutral olive grey */
* {
  scrollbar-color: #c5c8c3 transparent;
}

/* Screen-reader only (logo carries the visible wordmark) */
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.rail-brand-text {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.rail-brand-text span {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}

/* When rail is collapsed, show mark-only via mobile logo swap is optional;
   keep light logo readable at reduced width */
body.rail-collapsed .rail-brand .brand-symbol img {
  height: 28px;
  width: 28px;
  max-width: 28px;
  object-fit: cover;
  object-position: left center;
}

body.rail-collapsed .brand-symbol--rail {
  width: 28px;
  overflow: hidden;
}

/* Rail brand: full wordmark expanded, mark-only when collapsed */
.brand-symbol--rail {
  position: relative;
}

.brand-symbol--rail .brand-logo-mark {
  display: none;
  width: 32px;
  height: 30px;
  max-width: none;
}

.brand-symbol--rail .brand-logo-full {
  display: block;
}

body.rail-collapsed .brand-symbol--rail .brand-logo-full {
  display: none;
}

body.rail-collapsed .brand-symbol--rail .brand-logo-mark {
  display: block;
}

body.rail-collapsed .brand-symbol--rail {
  width: 34px;
  height: 32px;
  overflow: visible;
}

body.rail-collapsed .rail-brand .brand-symbol img {
  height: auto;
  width: auto;
  max-width: none;
  object-fit: unset;
}

/* Topbar: full dark wordmark on desktop auth; mark-only in compact mobile shell */
.topbar .brand-symbol .brand-logo-mark {
  display: none;
  width: 1.85rem;
  height: 1.85rem;
  max-width: none;
}

.topbar .brand-symbol .brand-logo-full {
  display: block;
  height: 32px;
  width: auto;
  max-width: 148px;
}

@media (max-width: 900px) {
  body.has-app-shell .topbar .brand .brand-symbol {
    width: 1.85rem !important;
    height: 1.85rem !important;
    border-radius: 0 !important;
    overflow: visible !important;
    background: transparent !important;
  }

  body.has-app-shell .topbar .brand-symbol .brand-logo-full {
    display: none;
  }

  body.has-app-shell .topbar .brand-symbol .brand-logo-mark {
    display: block;
  }
}

/* Auth logos on photo + form column */
.auth-visual-logo {
  height: 36px;
  width: auto;
  max-width: 168px;
}

.brand-symbol--auth {
  width: auto !important;
  height: auto !important;
  min-height: 36px;
}

/* Kill legacy fixed square backgrounds on brand marks */
.rail-brand .brand-symbol {
  width: auto !important;
  height: auto !important;
  min-height: 28px;
  border-radius: 0 !important;
  background: transparent !important;
  color: inherit !important;
  /* .rail-brand is a flex row: without this the symbol shrinks below the
     wordmark's intrinsic width and overflow:hidden clips it to "avenic". */
  flex: 0 0 auto;
}


/* ════════════════════════════════════════════════════════════════════
   CONTRAST PASS — denser greens, clearer edges, readable secondary text
   ════════════════════════════════════════════════════════════════════ */

/* --- Surfaces: white cards on tinted wash, real borders --- */
.panel,
.tile,
.corpus-tile,
.dash-panel,
.dash-metric,
.agent-bar,
.admin-record-panel,
.login-panel,
.filters-compact,
.corpus-interest-bar,
.notif-panel {
  border-color: var(--line) !important;
  background-color: var(--surface);
}

.tile,
.corpus-tile,
.dash-metric {
  box-shadow: var(--shadow-sm);
}

.tile:hover,
.corpus-tile:hover,
.dash-metric:hover {
  border-color: var(--primary) !important;
  box-shadow: var(--shadow);
}

/* --- Secondary text: was olive-grey and disappeared on wash --- */
.muted,
.topbar-user-label,
.rail-nav-section-label,
.tab-eyebrow,
.dd-type,
.agent-status,
.corpus-tile .meta,
.tile .meta,
.empty-state,
.login-demo-row {
  color: var(--muted) !important;
  opacity: 1 !important;
}

/* --- Soft brand fills: solid mint + deep ink (no washed pastels) --- */
.badge:not(.badge-open):not(.badge-warn):not(.badge-closed),
.badge-type,
.chip:not(.chip-danger):not(.chip-warn),
.fiche-badge,
.fiche-badge-eco,
.interest-badge,
.filters-badge,
.tag,
.corpus-ava,
.rail-pill:not(.rail-pill--muted) {
  background: var(--primary-soft) !important;
  color: var(--primary-strong) !important;
  border: 1px solid color-mix(in srgb, var(--primary) 35%, transparent) !important;
  font-weight: 700 !important;
}

.chip.active,
.chip[aria-selected="true"] {
  background: var(--primary) !important;
  color: #fff !important;
  border-color: var(--primary) !important;
}

.badge-open {
  background: #b8efd4 !important;
  color: #044f38 !important;
  border: 1px solid #067647 !important;
}

.badge-warn {
  background: #fde7c8 !important;
  color: #7a3404 !important;
  border: 1px solid #b45309 !important;
}

.badge-closed {
  background: #e6e9e2 !important;
  color: #3f4740 !important;
  border: 1px solid #9aa194 !important;
}

/* --- Primary CTAs on light UI: deep teal + white (max contrast) --- */
.btn-primary,
button.btn-primary,
.agent-btn--search {
  background: var(--primary) !important;
  color: #ffffff !important;
  border: 1px solid var(--primary-strong) !important;
  box-shadow: 0 1px 2px rgba(0, 56, 48, 0.2) !important;
  font-weight: 650 !important;
}

.btn-primary:hover,
button.btn-primary:hover,
.agent-btn--search:hover:not(:disabled) {
  background: var(--primary-strong) !important;
  border-color: var(--ink-900) !important;
  filter: none !important;
  color: #fff !important;
}

.agent-btn--search:disabled {
  opacity: 0.55;
  color: #fff !important;
}

/* Lime kept as high-energy accent (IA badge, dark-rail active) with dark ink */
.agent-badge,
/* --- Links --- */
a {
  color: var(--primary);
  font-weight: 600;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.15em;
}

a:hover {
  color: var(--primary-strong);
}

/* --- Forms: stronger field edges --- */
input,
select,
textarea,
.interest-badge-editor {
  border-color: var(--border-strong) !important;
  color: var(--text);
  background: #fff !important;
}

input:focus,
select:focus,
textarea:focus,
.interest-badge-editor:focus-within {
  border-color: var(--primary) !important;
  box-shadow: var(--focus-ring) !important;
}

input::placeholder,
textarea::placeholder {
  color: #6a7268 !important;
  opacity: 1 !important;
}

/* --- Rail active: fill only, no left accent bar --- */
.rail-nav .tab.active,
.app-rail .tab.active {
  background: rgba(255, 255, 255, 0.12) !important;
  color: #ffffff !important;
  box-shadow: none !important;
  font-weight: 650;
}

.rail-nav .tab.active::before,
.app-rail .tab.active::before {
  content: none !important;
  display: none !important;
}

.rail-nav .tab {
  color: rgba(255, 255, 255, 0.82);
}

.rail-nav .tab:hover:not(.active) {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.rail-nav-section-label {
  color: rgba(255, 255, 255, 0.55) !important;
}

.rail-brand-text span {
  color: rgba(255, 255, 255, 0.65) !important;
}

/* --- Auth aside accents --- */
.auth-eyebrow,
.auth-points svg {
  color: var(--brand-lime) !important;
}

/* --- Hardcoded pale greens left from first reskin --- */
/* (token swap covers most; force remaining soft hexes) */

/* ════════════════════════════════════════════════════════════════════
   LEFT EDGES — no curved “AI bars”; selection via fill only
   ════════════════════════════════════════════════════════════════════ */

/* Menu / rail: kill every left accent (inset bar + pill ::before) */
.rail-nav .tab.active,
.app-rail .tab.active,
.rail-nav .tab.active:hover,
.app-rail .tab.active:hover {
  box-shadow: none !important;
}

.rail-nav .tab.active::before,
.app-rail .tab.active::before,
.rail-nav .tab::before,
.app-rail .tab::before {
  content: none !important;
  display: none !important;
  width: 0 !important;
  height: 0 !important;
  box-shadow: none !important;
  background: none !important;
}

/* Metric / card hover bars */
.dash-metric::before,
.tile::before,
.corpus-tile::before,
.dash-panel::before {
  content: none !important;
  display: none !important;
}

/* List / form selection: no thick inset left stroke */
.admin-row.is-selected,
.admin-record-panel.is-editing .admin-record-head,
[class*="is-selected"],
[class*="is-editing"] {
  box-shadow: var(--shadow-sm) !important;
}

.admin-row.is-selected {
  box-shadow: var(--shadow-sm) !important;
  /* soft fill already set above — ensure no left inset sneaks back */
  background-image: none;
}

/* ════════════════════════════════════════════════════════════════════
   Legibility pass — small type, meta, chips, secondary chrome
   (TASA Orbiter is optically light; keep secondary text larger + denser)
   ════════════════════════════════════════════════════════════════════ */

/* .rail-foot-note is deliberately excluded: it sits on the dark rail, where
   --muted (a light-surface ink) renders near-invisible. It sets its own ink. */
.muted,
.section-hint,
.admin-field-hint,
.filters-bar-search-label,
.dash-section-hint,
.result-meta {
  color: var(--muted) !important;
  opacity: 1 !important;
}

.section-hint,
.dash-section-hint {
  font-size: 0.92rem !important;
  line-height: 1.45 !important;
  font-weight: 500 !important;
}

.admin-field-hint,
.cluster-news-image-dim-hint {
  font-size: 0.84rem !important;
  line-height: 1.4 !important;
  font-weight: 500 !important;
}

/* Catalog list rows (Actualités, News Avenia, marchés…) */
.admin-row-main strong,
.admin-row-titleline strong {
  font-weight: 600 !important;
  color: var(--text) !important;
  -webkit-font-smoothing: antialiased;
}

.admin-list-body .admin-row {
  margin-bottom: 0.35rem;
}

.admin-list-body {
  gap: 0.35rem;
}

/* Soft chips used as meta: never smaller than ~12.5px effective */
.admin-chip,
.badge,
.tag,
.chip {
  font-size: max(0.78rem, 12.5px) !important;
  font-weight: 600 !important;
  letter-spacing: 0.01em !important;
}

.badge:not(.badge-open):not(.badge-warn):not(.badge-closed),
.chip:not(.chip-danger):not(.chip-warn),
.tag {
  font-weight: 600 !important;
}

/* Corpus / tile cards on portal + admin consult */
.tile-meta,
.corpus-tile .meta,
.tile .meta,
.dd-org,
.dd-type {
  font-size: 0.88rem !important;
  font-weight: 500 !important;
  color: var(--muted) !important;
  opacity: 1 !important;
}

.tile strong,
.corpus-tile strong,
.corpus-tile h3,
.corpus-tile .title {
  font-weight: 600 !important;
  color: var(--text) !important;
  letter-spacing: -0.01em;
}

/* Form labels slightly larger */
.admin-field-label,
.filters-bar-search-label {
  font-size: 0.88rem !important;
  font-weight: 600 !important;
  color: var(--text) !important;
}

.admin-form-section-title {
  font-size: 0.78rem !important;
  font-weight: 600 !important;
  letter-spacing: 0.05em !important;
  color: var(--muted) !important;
}

/* Uppercase micro-labels: less tracking = more readable */
.tab-eyebrow,
.dash-eyebrow,
.dash-news-hero-eyebrow,
.cluster-news-card-date,
.cluster-news-dash-date,
.admin-status {
  letter-spacing: 0.04em !important;
  font-weight: 600 !important;
}

.admin-status {
  font-size: 0.72rem !important;
}

/* Inputs: ensure body-size readable text */
input,
select,
textarea {
  font-size: 0.95rem;
  line-height: 1.4;
  color: var(--text);
}

input::placeholder,
textarea::placeholder {
  color: color-mix(in srgb, var(--muted) 82%, #fff);
  opacity: 1;
}

/* Tickets: no curved left accent strip; list rows stay flush */

/* ——— Favoris (personal bookmarks) ———
   Stars sit in-flow next to titles/badges (never absolute over content). */

.btn-star {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 1.75rem;
  height: 1.75rem;
  margin: 0;
  padding: 0;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: #9ca3af;
  font-size: 0.95rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: none;
  transition:
    color 0.12s ease,
    background 0.12s ease,
    border-color 0.12s ease;
}

.btn-star:hover:not(:disabled) {
  color: #b45309;
  border-color: rgba(245, 158, 11, 0.45);
  background: rgba(245, 158, 11, 0.08);
}

.btn-star.is-on {
  color: #d97706;
  border-color: rgba(217, 119, 6, 0.35);
  background: rgba(245, 158, 11, 0.12);
}

.btn-star:disabled {
  opacity: 0.55;
  cursor: wait;
}

.btn-star:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

/* In-flow star / share slots — reserve space, no overlay */
.tile-star,
.tile-share,
.ticket-inbox-star,
.cluster-news-card-star,
.fiche-star {
  position: static;
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  line-height: 0;
}

.tile-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  min-width: 0;
}

.tile-title-row .tile-title {
  flex: 1 1 auto;
  min-width: 0;
}

.tile-head-end {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  gap: 0.35rem;
  max-width: 55%;
  pointer-events: auto;
}

.tile-head-end .badge {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ticket-inbox-card-end {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  gap: 0.4rem;
}

.ticket-inbox-card-top .ticket-inbox-subject {
  flex: 1 1 auto;
  min-width: 0;
  padding-right: 0;
}

/* Star pushed to the trailing edge of meta rows (in-flow, not overlay) */
.cluster-news-card-meta .cluster-news-card-star,
.cluster-news-article-meta .fiche-star {
  margin-left: auto;
}

.fiche-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.65rem;
  min-width: 0;
}

.fiche-title-row .fiche-title {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
}

.favoris-row .btn-star {
  margin-top: 0.1rem;
}

.favoris-root {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.favoris-empty {
  text-align: center;
  padding: 2.5rem 1.5rem;
}

.favoris-empty-icon {
  font-size: 2.25rem;
  color: #d97706;
  margin: 0 0 0.5rem;
}

.favoris-sections {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.favoris-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
}

.favoris-section-title {
  margin: 0;
  font-size: 1rem;
}

.favoris-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.favoris-row {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.55rem 0.35rem;
  border-radius: 0.65rem;
  border: 1px solid transparent;
}

.favoris-row:hover {
  background: rgba(15, 23, 42, 0.03);
  border-color: var(--line);
}

.favoris-row.is-unavailable {
  opacity: 0.72;
}

.favoris-row-body {
  flex: 1;
  min-width: 0;
}

.favoris-row-open {
  appearance: none;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
  width: 100%;
  margin: 0;
  padding: 0.15rem 0;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
  font: inherit;
  color: inherit;
}

.favoris-row-open:disabled {
  cursor: default;
}

.favoris-row-title {
  font-weight: 650;
  line-height: 1.3;
}

.favoris-row-meta {
  font-size: 0.85rem;
}

.admin-row-actions .btn-star {
  flex-shrink: 0;
}

/* ════════════════════════════════════════════════════════════════════
   Accueil member home — Andoris mockup structure (Avenia tokens)
   Hero → Briefing → Actualités magazine → Resources → Trust
   (No IA, no Match)
   ════════════════════════════════════════════════════════════════════ */

.dashboard--member-home {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* —— Shared section head —— */
.dash-home-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.dash-home-section-head-main {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  min-width: 0;
}

.dash-home-section-icon {
  flex-shrink: 0;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-soft);
  color: var(--primary);
}

.dash-home-section-icon svg {
  width: 1.15rem;
  height: 1.15rem;
}

.dash-home-section-icon--brief {
  background: color-mix(in srgb, var(--brand-lime) 35%, #fff);
  color: var(--primary-strong);
}

.dash-home-section-icon--actu {
  background: color-mix(in srgb, var(--brand-teal) 18%, #fff);
  color: var(--primary);
}

.dash-home-section-icon--res {
  background: color-mix(in srgb, #f59e0b 16%, #fff);
  color: #b45309;
}

.dash-home-section-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text);
  line-height: 1.25;
}

.dash-home-section-sub {
  margin: 0.2rem 0 0;
  font-size: 0.9rem;
  color: var(--muted);
  max-width: 48ch;
}

.dash-home-section-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: 0;
  background: transparent;
  color: var(--primary);
  font: inherit;
  font-family: var(--font-semibold);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  padding: 0.35rem 0.15rem;
  white-space: nowrap;
  transition: color var(--transition), transform var(--transition);
}

.dash-home-section-cta:hover {
  color: var(--primary-strong);
}

.dash-home-section-cta:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
  border-radius: 0.35rem;
}

/* —— Hero —— */
.dash-home-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(200px, 0.85fr);
  gap: 1.25rem 1.75rem;
  align-items: center;
  padding: 1.35rem 1.5rem 1.25rem;
  border-radius: var(--radius-lg);
  border: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
  background:
    radial-gradient(520px 180px at 100% 0%, rgba(182, 226, 74, 0.12), transparent 58%),
    radial-gradient(420px 160px at 0% 100%, rgba(0, 77, 67, 0.05), transparent 55%),
    linear-gradient(180deg, #ffffff 0%, #f8faf7 100%);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.85) inset,
    var(--shadow-sm);
}

.dash-home-hero-title {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-size: clamp(1.65rem, 2.6vw, 2.1rem);
  font-weight: 750;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--text);
}

.dash-home-hero-tagline {
  margin: 0 0 0.55rem;
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 1.8vw, 1.4rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--primary);
  line-height: 1.25;
}

.dash-home-hero-body {
  margin: 0 0 1.15rem;
  font-size: 0.98rem;
  line-height: 1.55;
  color: var(--muted);
  max-width: 48ch;
}

.dash-home-props {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem 1rem;
}

.dash-home-prop {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
}

.dash-home-prop-icon {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--primary) 10%, #fff);
  color: var(--primary);
  border: 1px solid color-mix(in srgb, var(--primary) 14%, var(--line));
}

.dash-home-prop-icon svg {
  width: 1rem;
  height: 1rem;
}

.dash-home-prop-label {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
}

.dash-home-hero-art {
  min-width: 0;
  display: flex;
  justify-content: flex-end;
}

.dash-home-hero-img {
  width: 100%;
  max-width: 420px;
  height: auto;
  display: block;
  border-radius: calc(var(--radius-lg) + 2px);
  object-fit: cover;
  aspect-ratio: 3 / 2;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.65) inset,
    0 12px 28px -16px rgba(18, 33, 27, 0.28);
}

/* —— Accueil search: soft Andoris IA panel (one surface, no nested input box) —— */
.dash-home-search {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.dash-ia-card {
  --ia-ink: #2e2a45;
  --ia-muted: #7a7694;
  --ia-purple: #5b3ae8;
  --ia-purple-soft: #6d52f0;
  --ia-purple-deep: #4a2fd4;
  --ia-purple-text: #5b3ae8;
  --ia-line: rgba(110, 95, 190, 0.14);
  --ia-chip: #ebe8fc;
  --ia-chip-hover: #e2ddfa;
  --ia-card: #f6f5fd;
  --ia-card-mid: #f9f8fe;
  --ia-aside: rgba(255, 255, 255, 0.38);
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(220px, 0.85fr);
  gap: 0;
  align-items: stretch;
  /* visible so the in-flow preview can expand the card (no clipped dropdown) */
  overflow: visible;
  border-radius: 1.25rem;
  border: 1px solid var(--ia-line);
  background:
    radial-gradient(520px 200px at 12% 0%, rgba(120, 100, 255, 0.1), transparent 55%),
    radial-gradient(420px 180px at 100% 100%, rgba(150, 130, 255, 0.07), transparent 50%),
    linear-gradient(165deg, #fbfafe 0%, var(--ia-card-mid) 42%, var(--ia-card) 100%);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.92) inset,
    0 14px 36px -22px rgba(70, 50, 150, 0.22);
}

.dash-ia-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  /* Room for the integrated composer strip */
  padding: 1.2rem 1.25rem 0 1.35rem;
}

.dash-ia-head {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
  padding-bottom: 1.05rem;
}

.dash-ia-badge {
  flex: 0 0 auto;
  width: 2.65rem;
  height: 2.65rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(155deg, #7b5cf5 0%, var(--ia-purple) 100%);
  color: #fff;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.22) inset,
    0 8px 18px -8px rgba(91, 58, 232, 0.55);
}

.dash-ia-badge svg {
  width: 1.2rem;
  height: 1.2rem;
  stroke-width: 1.85;
}

.dash-ia-head-copy {
  min-width: 0;
  padding-top: 0.15rem;
}

.dash-ia-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 0.98rem;
  font-weight: 750;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--ia-purple-text);
  line-height: 1.3;
}

.dash-ia-sub {
  margin: 0.28rem 0 0;
  font-size: 0.9rem;
  line-height: 1.45;
  color: var(--ia-muted);
  max-width: 46ch;
}

/*
 * Composer: same surface as the card — not a second box.
 * Only a soft hairline separates header from the question line.
 * Preview list is in-flow below the field so the card grows (drops open).
 */
.dash-search-shell.dash-ia-composer {
  position: relative;
  margin: 0 -1.25rem 0 -1.35rem;
  padding: 0.15rem 1.25rem 0.95rem 1.35rem;
  border-top: 1px solid var(--ia-line);
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.22) 0%,
    transparent 100%
  );
}

/* When preview is open, extend bottom padding so the list sits inside the card */
.dash-search-shell.dash-ia-composer.is-preview-open,
.dash-search-shell.dash-ia-composer:has(.dash-search-suggest:not([hidden])) {
  padding-bottom: 0.85rem;
}

.dash-ia-form {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-width: 0;
  width: 100%;
  margin: 0;
  padding: 0.55rem 0 0.35rem;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.dash-ia-form:focus-within {
  /* No second rectangle — only the underline below reacts */
}

.dash-ia-form:focus-within .dash-ia-field-icon {
  color: var(--ia-purple);
}

.dash-ia-field-icon {
  flex: 0 0 auto;
  display: inline-flex;
  width: 1.15rem;
  height: 1.15rem;
  color: #9a96b4;
  transition: color 0.15s ease;
}

.dash-ia-field-icon svg {
  width: 100%;
  height: 100%;
  stroke-width: 2;
}

.dash-ia-input {
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 0.98rem;
  font-weight: 450;
  line-height: 1.45;
  color: var(--ia-ink);
  padding: 0.35rem 0;
  outline: none;
  caret-color: var(--ia-purple);
}

.dash-ia-input::placeholder {
  color: #a19db8;
  opacity: 1;
  font-weight: 400;
}

.dash-ia-input::-webkit-search-cancel-button {
  appearance: none;
}

/* Soft focus line under the question (not a box) */
.dash-ia-form {
  position: relative;
}

.dash-ia-form::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1.5px;
  border-radius: 2px;
  background: color-mix(in srgb, var(--ia-purple) 18%, transparent);
  transform: scaleX(0.28);
  transform-origin: left center;
  transition:
    transform 0.22s ease,
    background 0.18s ease,
    opacity 0.18s ease;
  opacity: 0.65;
  pointer-events: none;
}

.dash-ia-form:focus-within::after {
  transform: scaleX(1);
  background: color-mix(in srgb, var(--ia-purple) 55%, #c4b8ff);
  opacity: 1;
}

/* Suggestions column — soft, not a second heavy panel */
.dash-ia-aside {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 1.2rem 1.2rem 1.15rem 1.1rem;
  background: var(--ia-aside);
  border-left: 1px solid var(--ia-line);
  backdrop-filter: blur(6px);
}

.dash-ia-aside-title {
  margin: 0 0 0.1rem;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ia-muted);
}

.dash-ia-chips {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.dash-ia-chip {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  border-radius: 999px;
  padding: 0.55rem 0.95rem;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  line-height: 1.4;
  color: var(--ia-purple-text);
  background: var(--ia-chip);
  cursor: pointer;
  transition:
    background 0.14s ease,
    color 0.14s ease,
    transform 0.12s ease;
}

.dash-ia-chip:hover {
  background: var(--ia-chip-hover);
  color: var(--ia-purple-deep);
}

.dash-ia-chip:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--ia-purple) 40%, #fff);
  outline-offset: 2px;
}

.dash-ia-discover {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.35rem;
  padding: 0.25rem 0.1rem;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 650;
  color: var(--ia-purple-text);
  cursor: pointer;
  text-align: left;
}

.dash-ia-discover:hover {
  color: var(--ia-purple-deep);
  text-decoration: underline;
  text-underline-offset: 0.16em;
}

.dash-ia-discover:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--ia-purple) 40%, #fff);
  outline-offset: 2px;
  border-radius: 0.35rem;
}

.dash-search-status {
  margin: 0.4rem 0 0;
  font-size: 0.78rem;
  min-height: 1em;
  color: var(--ia-muted);
}

/*
 * Preview list: in document flow so the Accueil card expands (“drops”) open.
 * Not position:absolute — that kept a fixed card height and clipped results.
 */
.dash-search-suggest {
  position: relative;
  z-index: 2;
  display: block;
  width: 100%;
  margin: 0.55rem 0 0;
  max-height: min(28rem, 60vh);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0.45rem 0.35rem 0.5rem;
  border-radius: 0.85rem;
  border: 1px solid color-mix(in srgb, var(--ia-purple) 10%, transparent);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: none;
  animation: dash-ia-preview-in 0.18s ease-out;
}

.dash-search-suggest[hidden] {
  display: none !important;
}

@keyframes dash-ia-preview-in {
  from {
    opacity: 0;
    transform: translateY(-0.35rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.dash-search-group + .dash-search-group {
  margin-top: 0.45rem;
  padding-top: 0.4rem;
  border-top: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}

.dash-search-group-label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.2rem 0.55rem 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.dash-search-group-count {
  font-weight: 650;
  letter-spacing: 0;
  text-transform: none;
  font-size: 0.72rem;
  padding: 0.05rem 0.4rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--line) 55%, #fff);
  color: var(--text);
}

.dash-search-options {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.dash-search-option {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  width: 100%;
  margin: 0;
  padding: 0.45rem 0.55rem;
  border-radius: 10px;
  cursor: pointer;
  text-align: left;
}

.dash-search-option:hover,
.dash-search-option.is-active {
  background: color-mix(in srgb, var(--primary) 9%, #fff);
}

.dash-search-option-type {
  flex: 0 0 auto;
  margin-top: 0.1rem;
  min-width: 2.1rem;
  padding: 0.12rem 0.3rem;
  border-radius: 6px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-align: center;
  color: var(--primary);
  background: color-mix(in srgb, var(--primary) 12%, #fff);
}

.dash-search-option-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.dash-search-option-title {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dash-search-option-meta {
  font-size: 0.78rem;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dash-search-preview-hint {
  padding: 0.35rem 0.55rem 0.5rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: #6e6c88;
}

.dash-search-empty {
  padding: 0.85rem 0.75rem;
  font-size: 0.9rem;
  color: var(--muted);
  text-align: center;
}

.dash-search-empty p {
  margin: 0;
}

.dash-search-empty-hint {
  margin-top: 0.35rem !important;
  font-size: 0.8rem;
  color: #9b99b0;
}

.dash-search-option-go {
  flex: 0 0 auto;
  align-self: center;
  color: #9b99b0;
  font-size: 0.95rem;
  opacity: 0;
  transition: opacity 0.12s ease, color 0.12s ease;
}

.dash-search-option:hover .dash-search-option-go,
.dash-search-option.is-active .dash-search-option-go {
  opacity: 1;
  color: var(--ia-purple-text, #5b3ae8);
}

@media (max-width: 900px) {
  .dash-ia-card {
    grid-template-columns: 1fr;
  }

  .dash-ia-aside {
    border-left: 0;
    border-top: 1px solid var(--ia-line);
    background: rgba(255, 255, 255, 0.28);
  }

  .dash-search-shell.dash-ia-composer {
    margin-right: -1.25rem;
  }
}

@media (max-width: 640px) {
  .dash-ia-main {
    padding: 1.05rem 1rem 0 1.05rem;
  }

  .dash-search-shell.dash-ia-composer {
    margin-left: -1.05rem;
    margin-right: -1rem;
    padding-left: 1.05rem;
    padding-right: 1rem;
  }

  .dash-ia-aside {
    padding: 1rem;
  }

  .dash-ia-title {
    font-size: 0.92rem;
  }
}

/* —— Briefing —— */
.dash-home-briefing {
  padding: 1.2rem 1.25rem 1.25rem;
  border-radius: var(--radius-lg);
  border: 1px solid color-mix(in srgb, var(--line) 75%, transparent);
  background:
    linear-gradient(180deg, #ffffff 0%, #fbfcf9 100%);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 10px 28px -16px rgba(18, 33, 27, 0.14);
}

.dash-brief-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.9rem;
  align-items: stretch;
}

.dash-brief-col {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  min-width: 0;
  padding: 1rem 1.05rem 0.9rem;
  border-radius: 14px;
  border: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
  background: #fff;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.95) inset,
    0 6px 18px -12px rgba(18, 33, 27, 0.12);
}

.dash-brief-col--info {
  background: linear-gradient(165deg, #f4fbf7 0%, #fff 55%);
  border-color: color-mix(in srgb, var(--primary) 14%, var(--line));
}

.dash-brief-col--funding {
  background: linear-gradient(165deg, #f6f4fc 0%, #fff 55%);
  border-color: color-mix(in srgb, #7c3aed 12%, var(--line));
}

.dash-brief-col--tenders {
  background: linear-gradient(165deg, #fff8f1 0%, #fff 55%);
  border-color: color-mix(in srgb, #f59e0b 16%, var(--line));
}

.dash-brief-col--tickets {
  background: linear-gradient(165deg, #f0f7fc 0%, #fff 55%);
  border-color: color-mix(in srgb, #0284c7 14%, var(--line));
}

.dash-brief-col-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.dash-brief-col-icon {
  width: 1.65rem;
  height: 1.65rem;
  border-radius: 0.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.85);
  color: var(--primary);
}

.dash-brief-col--funding .dash-brief-col-icon {
  color: #6d28d9;
}

.dash-brief-col--tenders .dash-brief-col-icon {
  color: #c2410c;
}

.dash-brief-col--tickets .dash-brief-col-icon {
  color: #0369a1;
}

.dash-brief-col-icon svg {
  width: 0.95rem;
  height: 0.95rem;
}

.dash-brief-col-title {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text);
}

.dash-brief-count {
  margin: 0;
  font-size: 0.88rem;
  color: var(--muted);
}

.dash-brief-count strong {
  font-size: 1.45rem;
  font-weight: 780;
  font-variant-numeric: tabular-nums;
  color: var(--primary);
  letter-spacing: -0.03em;
  margin-right: 0.2rem;
}

.dash-brief-col--funding .dash-brief-count strong {
  color: #6d28d9;
}

.dash-brief-col--tenders .dash-brief-count strong {
  color: #c2410c;
}

.dash-brief-col--tickets .dash-brief-count strong {
  color: #0369a1;
}

.dash-brief-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  flex: 1 1 auto;
}

.dash-brief-list:not(.dash-brief-list--cards) {
  list-style: disc;
  padding-left: 1.15rem;
}

.dash-brief-list:not(.dash-brief-list--cards) li {
  padding-left: 0.1rem;
}

.dash-brief-link,
.dash-brief-card {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  font: inherit;
  text-align: left;
  cursor: pointer;
  color: var(--text);
}

.dash-brief-link {
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text);
}

.dash-brief-link:hover {
  color: var(--primary);
}

.dash-brief-card {
  padding: 0.55rem 0.65rem;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.dash-brief-card:hover {
  border-color: color-mix(in srgb, var(--primary) 28%, var(--line));
  box-shadow: 0 4px 12px -8px rgba(0, 77, 67, 0.25);
}

.dash-brief-card-title {
  display: block;
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text);
}

.dash-brief-card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.35rem;
}

.dash-brief-deadline {
  font-size: 0.75rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.dash-brief-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  color: #5b21b6;
  background: color-mix(in srgb, #7c3aed 14%, #fff);
}

.dash-brief-card-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
}

.dash-brief-chip {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  color: #9a3412;
  background: color-mix(in srgb, #f59e0b 18%, #fff);
}

.dash-brief-card-sub {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.78rem;
  color: var(--muted);
}

.dash-brief-empty {
  margin: 0;
  font-size: 0.88rem;
  color: var(--muted);
  flex: 1 1 auto;
}

.dash-brief-footer {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin-top: 0.35rem;
  padding: 0.25rem 0;
  border: 0;
  background: transparent;
  font: inherit;
  font-family: var(--font-semibold);
  font-weight: 600;
  font-size: 0.86rem;
  color: var(--primary);
  cursor: pointer;
  align-self: flex-start;
}

.dash-brief-col--funding .dash-brief-footer {
  color: #6d28d9;
}

.dash-brief-col--tenders .dash-brief-footer {
  color: #c2410c;
}

.dash-brief-col--tickets .dash-brief-footer {
  color: #0369a1;
}

.dash-brief-chip--status {
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.72rem;
}

.dash-brief-chip--open {
  background: color-mix(in srgb, var(--primary) 12%, #fff);
  color: var(--primary-strong, var(--primary));
}

.dash-brief-chip--pending {
  background: color-mix(in srgb, #0284c7 12%, #fff);
  color: #0369a1;
}

.dash-brief-footer:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.dash-brief-footer:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
  border-radius: 0.35rem;
}

/* —— Actualités magazine —— */
.dash-home-actu {
  padding: 1.2rem 1.25rem 1.25rem;
  border-radius: var(--radius-lg);
  border: 1px solid color-mix(in srgb, var(--line) 75%, transparent);
  background:
    linear-gradient(180deg, #ffffff 0%, #fbfcf9 100%);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 10px 28px -16px rgba(18, 33, 27, 0.14);
}

.dash-actu-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(240px, 1fr);
  gap: 1rem;
  align-items: stretch;
}

.dash-actu-feature {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  border: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
  border-radius: calc(var(--radius-lg) + 2px);
  overflow: hidden;
  background: #fff;
  cursor: pointer;
  text-align: left;
  color: inherit;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 12px 28px -16px rgba(18, 33, 27, 0.18);
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
}

.dash-actu-feature:hover {
  border-color: color-mix(in srgb, var(--primary) 28%, var(--line));
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.95) inset,
    0 18px 36px -14px rgba(0, 77, 67, 0.22);
}

@media (prefers-reduced-motion: no-preference) {
  .dash-actu-feature:hover {
    transform: translateY(-2px);
  }
}

.dash-actu-feature:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.dash-actu-feature-media {
  position: relative;
  min-height: 200px;
  aspect-ratio: 16 / 10;
  background:
    radial-gradient(120% 90% at 15% 0%, rgba(23, 182, 164, 0.28), transparent 55%),
    linear-gradient(145deg, #0d3d36 0%, #174a42 45%, #0f2f2a 100%);
  overflow: hidden;
}

.dash-actu-feature-media.is-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
}

.dash-actu-feature-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

.dash-actu-feature-mono {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 700;
  color: rgba(193, 247, 105, 0.55);
}

.dash-actu-feature-body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.45rem;
  padding: 1rem 1.1rem 1.15rem;
}

.dash-actu-feature-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.dash-actu-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #12211b;
  background: var(--brand-lime);
}

.dash-actu-date {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.dash-actu-feature-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 1.8vw, 1.4rem);
  font-weight: 750;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--text);
}

.dash-actu-feature-preview {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.dash-actu-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin-top: 0.25rem;
  font-family: var(--font-semibold);
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--primary);
}

.dash-actu-cta--ghost {
  margin-top: 0.15rem;
  font-size: 0.82rem;
}

.dash-actu-side {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  min-width: 0;
}

.dash-actu-side-item {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 0;
  margin: 0;
  padding: 0;
  border: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
  border-radius: var(--radius-md);
  background: #fff;
  overflow: hidden;
  cursor: pointer;
  text-align: left;
  color: inherit;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    var(--shadow-sm);
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
}

.dash-actu-side-item:hover {
  border-color: color-mix(in srgb, var(--primary) 28%, var(--line));
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.95) inset,
    0 12px 24px -14px rgba(0, 77, 67, 0.2);
}

@media (prefers-reduced-motion: no-preference) {
  .dash-actu-side-item:hover {
    transform: translateY(-1px);
  }
}

.dash-actu-side-item:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.dash-actu-side-media {
  min-height: 100%;
  background:
    radial-gradient(120% 100% at 10% 0%, rgba(23, 182, 164, 0.22), transparent 55%),
    linear-gradient(145deg, #c5e4db 0%, #b7dcd2 55%, #9fd4c8 100%);
  overflow: hidden;
}

.dash-actu-side-media.is-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
}

.dash-actu-side-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.dash-actu-side-mono {
  font-size: 1rem;
  font-weight: 800;
  color: var(--primary);
  opacity: 0.8;
}

.dash-actu-side-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.28rem;
  padding: 0.7rem 0.85rem;
  min-width: 0;
}

.dash-actu-side-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
}

.dash-actu-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  font-size: 0.66rem;
  font-weight: 700;
  color: var(--primary);
  background: var(--primary-soft);
}

.dash-actu-side-title {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* —— Resources explorer —— */
.dash-home-resources {
  padding: 1.2rem 1.25rem 1.25rem;
  border-radius: var(--radius-lg);
  border: 1px solid color-mix(in srgb, #f59e0b 18%, var(--line));
  background:
    linear-gradient(180deg, #fffdf9 0%, #ffffff 100%);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 10px 28px -16px rgba(18, 33, 27, 0.12);
}

.dash-res-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
}

.dash-res-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.4rem;
  min-width: 0;
  margin: 0;
  padding: 1.05rem 1rem 1rem;
  border-radius: 14px;
  border: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
  background:
    linear-gradient(165deg, #ffffff 0%, #f7faf8 100%);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.95) inset,
    0 10px 28px -14px rgba(18, 33, 27, 0.14);
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: inherit;
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease,
    transform 180ms cubic-bezier(0.22, 1, 0.36, 1);
}

.dash-res-card:hover {
  border-color: color-mix(in srgb, var(--primary) 28%, var(--line));
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.98) inset,
    0 18px 36px -14px rgba(0, 77, 67, 0.22);
}

@media (prefers-reduced-motion: no-preference) {
  .dash-res-card:hover {
    transform: translateY(-2px);
  }
}

.dash-res-card:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.dash-res-icon {
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 0.65rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.15rem;
  background: var(--primary-soft);
  color: var(--primary);
}

.dash-res-card--tenders .dash-res-icon {
  background: color-mix(in srgb, #f59e0b 16%, #fff);
  color: #c2410c;
}

.dash-res-card--news .dash-res-icon {
  background: color-mix(in srgb, var(--brand-teal) 16%, #fff);
  color: var(--primary);
}

.dash-res-card--funding .dash-res-icon {
  background: color-mix(in srgb, #7c3aed 12%, #fff);
  color: #6d28d9;
}

.dash-res-icon svg {
  width: 1.1rem;
  height: 1.1rem;
}

.dash-res-title {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text);
}

.dash-res-count {
  font-size: 0.86rem;
  color: var(--muted);
}

.dash-res-count strong {
  display: block;
  font-size: 1.55rem;
  font-weight: 780;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
  color: var(--primary);
  line-height: 1.1;
  margin-bottom: 0.1rem;
}

.dash-res-card--tenders .dash-res-count strong {
  color: #c2410c;
}

.dash-res-card--funding .dash-res-count strong {
  color: #6d28d9;
}

.dash-res-blurb {
  font-size: 0.84rem;
  line-height: 1.4;
  color: var(--muted);
  flex: 1 1 auto;
}

.dash-res-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin-top: 0.35rem;
  font-family: var(--font-semibold);
  font-weight: 600;
  font-size: 0.86rem;
  color: var(--primary);
}

.dash-res-card--tenders .dash-res-cta {
  color: #c2410c;
}

.dash-res-card--funding .dash-res-cta {
  color: #6d28d9;
}

/* —— Trust footer —— */
.dash-home-trust {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 0.95rem 1.2rem;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--primary) 14%, var(--line));
  background:
    linear-gradient(180deg, #f4faf8 0%, #eef7f4 100%);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.85) inset,
    var(--shadow-sm);
}

.dash-home-trust-main {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.dash-home-trust-icon {
  flex-shrink: 0;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  color: var(--primary);
  border: 1px solid color-mix(in srgb, var(--primary) 16%, var(--line));
}

.dash-home-trust-icon svg {
  width: 1.05rem;
  height: 1.05rem;
}

.dash-home-trust-title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
}

.dash-home-trust-sub {
  margin: 0.12rem 0 0;
  font-size: 0.84rem;
  color: var(--muted);
}

.dash-home-trust-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font-semibold);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--primary);
  text-decoration: none;
  white-space: nowrap;
}

.dash-home-trust-cta:hover {
  color: var(--primary-strong);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.dash-home-trust-cta:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
  border-radius: 0.35rem;
}

/* —— Responsive —— */
@media (max-width: 1200px) {
  .dash-brief-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1100px) {
  .dash-res-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 960px) {
  .dash-home-hero {
    grid-template-columns: 1fr;
  }

  .dash-home-hero-art {
    justify-content: center;
    order: -1;
  }

  .dash-home-hero-img {
    max-width: 320px;
  }

  .dash-brief-grid {
    grid-template-columns: 1fr;
  }

  .dash-actu-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .dash-home-props {
    grid-template-columns: 1fr;
  }

  .dash-res-grid {
    grid-template-columns: 1fr;
  }

  .dash-home-trust {
    border-radius: var(--radius-lg);
  }

  .dash-actu-side-item {
    grid-template-columns: 72px minmax(0, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  .dash-actu-feature:hover,
  .dash-actu-side-item:hover,
  .dash-res-card:hover {
    transform: none;
  }
}

/* ════════════════════════════════════════════════════════════════════
   Accueil surface hierarchy (elevated craft)
   Wins over earlier dash base + flat-strip demotions.
   Weight: news magazine / admin rich hero (peak) > greeting + KPI cards
   (interactive instruments with soft depth) > deadlines panel >
   explore panels (secondary elevated cards).
   Depth is soft slate/teal shadow — never heavy gray float.
   ════════════════════════════════════════════════════════════════════ */

.dashboard {
  gap: 1.45rem;
}

/* KPI grid: individual elevated instrument cards */
.dashboard .dash-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}

.dashboard .dash-metrics--admin {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.dashboard .dash-metric,
.dashboard .dash-metric--rich {
  position: relative;
  isolation: isolate;
  border-radius: 14px !important;
  border: 1px solid color-mix(in srgb, var(--line) 75%, transparent) !important;
  background:
    linear-gradient(165deg, #ffffff 0%, #f7faf8 100%) !important;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.95) inset,
    0 1px 2px rgba(20, 24, 22, 0.04),
    0 10px 28px -14px rgba(18, 33, 27, 0.16) !important;
  transform: none;
  overflow: hidden;
  padding: 1.05rem 1.1rem 1.1rem !important;
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease,
    transform 180ms cubic-bezier(0.22, 1, 0.36, 1),
    background 180ms ease !important;
}

/* Tonal left edge — square flush strip (no curved / pill AI bar) */
.dashboard .dash-metric--rich::before {
  content: "";
  display: block !important;
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  border-radius: 0;
  background: var(--primary);
  opacity: 0.85;
  z-index: 1;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.dashboard .dash-metric--rich:has(.dash-metric-icon--sky)::before {
  background: linear-gradient(180deg, #0ea5e9, #0284c7);
}

.dashboard .dash-metric--rich:has(.dash-metric-icon--emerald)::before {
  background: linear-gradient(180deg, #10b981, #047857);
}

.dashboard .dash-metric--rich:has(.dash-metric-icon--violet)::before {
  background: linear-gradient(180deg, var(--brand-teal), var(--primary));
}

.dashboard .dash-metric--rich:has(.dash-metric-icon--indigo)::before,
.dashboard .dash-metric--rich:has(.dash-metric-icon--slate)::before {
  background: linear-gradient(180deg, var(--brand-teal), var(--primary));
}

.dashboard .dash-metric:last-child,
.dashboard .dash-metric--rich:last-child {
  border-right: 1px solid color-mix(in srgb, var(--line) 75%, transparent) !important;
}

.dashboard .dash-metric:hover,
.dashboard .dash-metric--rich:hover {
  border-color: color-mix(in srgb, var(--primary) 28%, var(--line)) !important;
  background:
    linear-gradient(165deg, #ffffff 0%, color-mix(in srgb, var(--primary-soft) 40%, #fff) 100%) !important;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.98) inset,
    0 2px 6px rgba(20, 24, 22, 0.05),
    0 18px 36px -14px rgba(0, 77, 67, 0.28) !important;
  transform: translateY(-2px) !important;
}

.dashboard .dash-metric--rich:hover::before {
  top: 0;
  bottom: 0;
  opacity: 1;
}

.dashboard .dash-metric:last-child:hover,
.dashboard .dash-metric--rich:last-child:hover {
  border-right-color: color-mix(in srgb, var(--primary) 28%, var(--line)) !important;
}

.dashboard .dash-metric:focus-visible,
.dashboard .dash-metric--rich:focus-visible {
  outline: none;
  box-shadow:
    var(--focus-ring),
    0 1px 0 rgba(255, 255, 255, 0.95) inset,
    0 10px 28px -14px rgba(18, 33, 27, 0.16) !important;
  z-index: 1;
}

/* Metric icon chips — slightly richer depth */
.dashboard .dash-metric-icon {
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 12px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.55) inset;
}

.dashboard .dash-metric--rich .dash-metric-value {
  font-size: 1.95rem;
  font-weight: 780;
  letter-spacing: -0.045em;
  color: var(--ink-900);
}

.dashboard .dash-metric--rich .dash-metric-label {
  font-size: 0.84rem;
  font-weight: 650;
  color: var(--muted);
}

.dashboard .dash-metric:hover .dash-metric-arrow {
  opacity: 1;
  transform: translateX(0);
}

/* Deadlines / priorities / matchs: soft elevated panel */
.dashboard .dash-section,
.dashboard .dash-section--deadlines,
.dashboard .dash-section--priorities,
.dashboard .dash-section--matches-day {
  border: 1px solid color-mix(in srgb, var(--line) 75%, transparent) !important;
  border-radius: var(--radius-lg) !important;
  background:
    linear-gradient(180deg, #ffffff 0%, #f8faf7 100%) !important;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 1px 2px rgba(20, 24, 22, 0.04),
    0 14px 32px -16px rgba(18, 33, 27, 0.14) !important;
  overflow: hidden;
  padding: 0;
}

.dashboard .dash-match-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.75rem;
  padding: 0.9rem 1.15rem 1.1rem;
}

.dashboard .dash-match-card {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 0.85rem 0.95rem;
  border: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
  border-radius: var(--radius-md, 10px);
  background: #fff;
}

.dashboard .dash-match-card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
}

.dashboard .dash-match-score {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--primary);
}

.dashboard .dash-match-pair {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 650;
  line-height: 1.3;
}

.dashboard .dash-match-types {
  margin: 0;
  font-size: 0.82rem;
}

.dashboard .dash-match-pitch {
  margin: 0 0 0.25rem;
  font-size: 0.88rem;
  line-height: 1.4;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.dashboard .dash-match-card .btn-match-primary {
  align-self: flex-start;
  margin-top: auto;
}

.dashboard .dash-section-head {
  background:
    linear-gradient(
      180deg,
      color-mix(in srgb, var(--primary-soft) 28%, #fff) 0%,
      transparent 100%
    ) !important;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 85%, transparent);
  padding: 0.95rem 1.15rem 0.9rem;
  align-items: center;
}

.dashboard .dash-section-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.025em;
}

.dashboard .dash-section-hint {
  margin-top: 0.25rem;
}

.dashboard .dash-text-btn {
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0.38rem 0.72rem;
  transition:
    background var(--transition),
    border-color var(--transition),
    color var(--transition);
}

.dashboard .dash-text-btn:hover {
  background: var(--primary-soft);
  border-color: color-mix(in srgb, var(--primary) 18%, transparent);
}

.dashboard .dash-deadline-head {
  background: color-mix(in srgb, var(--bg-subtle) 55%, #fff) !important;
  padding: 0.6rem 1.15rem;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 85%, transparent);
}

.dashboard .dash-deadline-row {
  padding: 0.72rem 1.15rem;
  background: transparent;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
  transition:
    background 140ms ease,
    box-shadow 140ms ease;
}

.dashboard .dash-deadline-row:last-child {
  border-bottom: 0;
}

.dashboard .dash-deadline-row:hover,
.dashboard .dash-deadline-table [role="row"]:hover {
  background: color-mix(in srgb, var(--primary) 5.5%, #fff) !important;
}

.dashboard .dash-deadline-row:focus-visible {
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--primary) 40%, transparent);
}

/* Urgency row accents — quiet left tint, not loud bars */
.dashboard .dash-deadline-row.is-critical {
  background: linear-gradient(
    90deg,
    color-mix(in srgb, #b42318 7%, transparent) 0%,
    transparent 42%
  );
}

.dashboard .dash-deadline-row.is-soon {
  background: linear-gradient(
    90deg,
    color-mix(in srgb, #b54708 7%, transparent) 0%,
    transparent 42%
  );
}

.dashboard .dash-deadline-row.is-critical:hover {
  background: linear-gradient(
    90deg,
    color-mix(in srgb, #b42318 11%, transparent) 0%,
    color-mix(in srgb, var(--primary) 4%, #fff) 55%
  ) !important;
}

.dashboard .dash-deadline-row.is-soon:hover {
  background: linear-gradient(
    90deg,
    color-mix(in srgb, #b54708 11%, transparent) 0%,
    color-mix(in srgb, var(--primary) 4%, #fff) 55%
  ) !important;
}

/* Explore panels: secondary elevated cards */
.dashboard .dash-explore {
  gap: 0.95rem;
}

.dashboard .dash-panel {
  border: 1px solid color-mix(in srgb, var(--line) 75%, transparent);
  border-radius: 14px;
  background:
    linear-gradient(180deg, #ffffff 0%, #fbfcf9 100%);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.92) inset,
    0 1px 2px rgba(20, 24, 22, 0.04),
    0 12px 28px -14px rgba(18, 33, 27, 0.14) !important;
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
}

.dashboard .dash-panel:hover {
  border-color: color-mix(in srgb, var(--primary) 18%, var(--line));
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.95) inset,
    0 2px 6px rgba(20, 24, 22, 0.05),
    0 18px 36px -14px rgba(0, 77, 67, 0.18) !important;
}

.dashboard .dash-panel-head {
  background:
    linear-gradient(
      180deg,
      color-mix(in srgb, var(--primary-soft) 22%, #fff) 0%,
      transparent 100%
    );
  border-bottom: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
  padding: 0.85rem 1rem;
}

.dashboard .dash-panel-icon {
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 9px;
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--primary-soft) 80%, #fff), var(--primary-soft));
  color: var(--primary);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.55) inset;
}

.dashboard .dash-panel-count {
  background: color-mix(in srgb, var(--primary-soft) 45%, #fff);
  border: 1px solid color-mix(in srgb, var(--primary) 16%, var(--line));
  color: var(--primary);
  font-weight: 700;
}

.dashboard .dash-panel-cta {
  border-radius: 999px;
  padding: 0.35rem 0.65rem;
  border: 1px solid transparent;
}

.dashboard .dash-panel-cta:hover {
  background: var(--primary-soft);
  border-color: color-mix(in srgb, var(--primary) 16%, transparent);
}

.dashboard .dash-panel-body {
  padding: 0.35rem 0.45rem 0.5rem;
}

.dashboard .dash-row {
  border-radius: 10px;
  transition:
    background 140ms ease,
    box-shadow 140ms ease,
    transform 140ms ease;
}

.dashboard .dash-row:hover {
  background: color-mix(in srgb, var(--primary) 6%, #fff);
  box-shadow: 0 1px 0 rgba(0, 77, 67, 0.04);
}

.dashboard .dash-row-ava {
  background: linear-gradient(145deg, #d7efe8, #c5e4db);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.55) inset;
}

.dashboard .dash-row-ava--logo {
  background: #fff;
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--line) 80%, transparent),
    0 1px 2px rgba(18, 33, 27, 0.05);
}

/* Empty states inside panels — soft dashed invitation */
.dashboard .dash-empty {
  margin: 0.35rem;
  border-radius: 12px;
  border: 1px dashed color-mix(in srgb, var(--line) 90%, var(--primary));
  background: color-mix(in srgb, var(--bg-subtle) 50%, #fff);
}

/* Pills on greeting — slightly more present */
.dashboard .dash-pill {
  border-radius: 999px;
  padding: 0.28rem 0.7rem;
  background: color-mix(in srgb, var(--primary-soft) 40%, #fff);
  border-color: color-mix(in srgb, var(--primary) 14%, var(--line));
  color: var(--primary);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.7) inset;
}

.dashboard .dash-pill--muted {
  background: var(--bg-subtle);
  color: var(--muted);
  border-color: var(--line);
}

.dashboard .dash-pill--member {
  background: #fff;
  color: var(--text);
  border-color: color-mix(in srgb, var(--primary) 18%, var(--line));
}

/* News magazine hero keeps the strongest Accueil moment (company) */
.dashboard--avenia-home .dash-news-hero {
  position: relative;
}

/* Admin Accueil: dark brand hero remains the primary weight */
.dashboard > .dash-hero--rich {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 22px 48px -24px rgba(18, 33, 27, 0.55);
}

/* Loading / error — quiet, non-competing */
.dashboard .dash-loading-card,
.dashboard .dash-error-card {
  box-shadow: var(--shadow-sm);
  background: var(--surface);
  border-radius: var(--radius-md);
}

/* Staggered reveal for elevated surfaces */
@media (prefers-reduced-motion: no-preference) {
  .dashboard .dash-greet,
  .dashboard .dash-news-hero,
  .dashboard .dash-metric--rich,
  .dashboard .dash-section--deadlines,
  .dashboard .dash-panel {
    animation: stratum-card-in 380ms cubic-bezier(0.22, 1, 0.36, 1) backwards;
  }

  .dashboard .dash-news-hero { animation-delay: 40ms; }
  .dashboard .dash-metric--rich:nth-child(1) { animation-delay: 70ms; }
  .dashboard .dash-metric--rich:nth-child(2) { animation-delay: 100ms; }
  .dashboard .dash-metric--rich:nth-child(3) { animation-delay: 130ms; }
  .dashboard .dash-metric--rich:nth-child(4) { animation-delay: 160ms; }
  .dashboard .dash-metric--rich:nth-child(5) { animation-delay: 190ms; }
  .dashboard .dash-section--deadlines { animation-delay: 180ms; }
  .dashboard .dash-panel:nth-child(1) { animation-delay: 210ms; }
  .dashboard .dash-panel:nth-child(2) { animation-delay: 240ms; }
  .dashboard .dash-panel:nth-child(3) { animation-delay: 270ms; }
  .dashboard .dash-panel:nth-child(4) { animation-delay: 300ms; }
}

@media (prefers-reduced-motion: reduce) {
  .dashboard .dash-greet,
  .dashboard .dash-news-hero,
  .dashboard .dash-metric--rich,
  .dashboard .dash-section--deadlines,
  .dashboard .dash-panel {
    animation: none !important;
  }

  .dashboard .dash-metric:hover,
  .dashboard .dash-metric--rich:hover {
    transform: none !important;
  }
}

/* KPI grid responsive — cards keep individual borders (no shared strip) */
@media (max-width: 1100px) {
  .dashboard .dash-metrics--admin {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .dashboard .dash-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
  }

  .dashboard .dash-metrics--admin {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard .dash-metric,
  .dashboard .dash-metric--rich {
    border: 1px solid color-mix(in srgb, var(--line) 75%, transparent) !important;
  }
}

@media (max-width: 560px) {
  .dashboard .dash-metrics {
    grid-template-columns: 1fr;
    gap: 0.65rem;
  }

  .dashboard .dash-greet {
    padding: 0.9rem 1rem;
  }

  .dashboard .dash-section-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.65rem;
  }
}

/* —— MCP setup (instructions page) — Avenia design system —— */
/* Full-width like other tab shells — no narrow “article” column */
.tab-shell--mcp {
  width: 100%;
  max-width: none;
}
.tab-shell--mcp .mcp-setup.panel,
.mcp-setup.panel {
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
}
.mcp-setup {
  width: 100%;
  max-width: none;
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
}
.mcp-page {
  display: grid;
  gap: 0.85rem;
  width: 100%;
  max-width: none;
}

.mcp-hero {
  display: grid;
  gap: 1.15rem;
  padding: 1.1rem 1.2rem 1.2rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}
@media (min-width: 900px) {
  .mcp-hero {
    grid-template-columns: minmax(0, 1fr) minmax(14rem, 18rem);
    align-items: stretch;
  }
}
.mcp-hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.5rem;
}
.mcp-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.72rem;
  font-weight: 600;
  font-family: var(--font-semibold);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary);
  border: 1px solid color-mix(in srgb, var(--primary) 18%, transparent);
}
.mcp-badge--staff {
  background: var(--success-soft);
  color: var(--success);
  border-color: color-mix(in srgb, var(--success) 22%, transparent);
}
.mcp-badge--company {
  background: var(--primary-soft);
  color: var(--primary);
}
.mcp-badge--proto {
  background: var(--surface-2);
  color: var(--muted);
  border-color: var(--line);
}
.mcp-hero-title {
  margin: 0 0 0.45rem;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.02em;
  color: var(--text);
}
.mcp-hero-lead {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
  font-size: 0.94rem;
  max-width: none;
}
.mcp-hero-aside {
  display: grid;
  gap: 0.5rem;
  align-content: start;
}
.mcp-stat {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.55rem 0.75rem;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
}
.mcp-stat-label { color: var(--muted); }
.mcp-stat-value {
  font-weight: 600;
  font-family: var(--font-semibold);
  color: var(--text);
}

.mcp-card {
  padding: 1.05rem 1.15rem 1.2rem;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}
.mcp-card--muted {
  background: var(--surface-2);
  box-shadow: none;
}
.mcp-card-head { margin-bottom: 0.75rem; }
.mcp-h3 {
  margin: 0 0 0.3rem;
  font-family: var(--font-display);
  font-size: 1.02rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
}
.mcp-card-head .muted {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.45;
  color: var(--muted);
}

.mcp-url-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
  margin: 0.35rem 0 0.85rem;
}
.mcp-url {
  flex: 1 1 16rem;
  display: block;
  min-width: 0;
  padding: 0.65rem 0.85rem;
  background: var(--ink-800);
  color: #f5f6f4;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  word-break: break-all;
  line-height: 1.4;
  border: 1px solid var(--ink-900);
}
.mcp-url-row .btn-primary {
  flex: 0 0 auto;
}

.mcp-callout {
  padding: 0.75rem 0.9rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--surface-2);
  font-size: 0.9rem;
  line-height: 1.45;
  margin: 0.65rem 0;
}
.mcp-callout strong {
  display: block;
  margin-bottom: 0.25rem;
  color: var(--text);
  font-family: var(--font-semibold);
}
.mcp-callout p { margin: 0; color: var(--muted); }
.mcp-callout code {
  font-size: 0.84em;
  background: color-mix(in srgb, var(--surface) 80%, transparent);
  padding: 0.05rem 0.28rem;
  border-radius: 4px;
}
.mcp-callout--info {
  border-color: color-mix(in srgb, var(--primary) 28%, var(--line));
  background: var(--primary-soft);
}
.mcp-callout--warn {
  border-color: color-mix(in srgb, var(--warn) 35%, var(--line));
  background: var(--warn-soft);
}

.mcp-steps,
.mcp-list,
.mcp-list-ol {
  margin: 0.35rem 0 0;
  padding-left: 1.25rem;
  line-height: 1.55;
  color: var(--muted);
  font-size: 0.92rem;
}
.mcp-steps--rich > li {
  margin-bottom: 0.65rem;
}
.mcp-steps--rich > li > strong {
  display: block;
  color: var(--text);
  margin-bottom: 0.15rem;
  font-family: var(--font-semibold);
}
.mcp-list--check {
  list-style: none;
  padding-left: 0;
}
.mcp-list--check > li {
  position: relative;
  padding-left: 1.35rem;
  margin-bottom: 0.45rem;
}
.mcp-list--check > li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--success);
  font-weight: 700;
}

/* Client guide tabs — teal active (nav brand), not indigo pills */
.mcp-client-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.95rem;
}
.mcp-client-tab {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  border-radius: 3.75rem;
  padding: 0.42rem 0.95rem;
  font-size: 0.85rem;
  font-weight: 600;
  font-family: var(--font-semibold);
  cursor: pointer;
  transition:
    background var(--transition),
    border-color var(--transition),
    color var(--transition),
    box-shadow var(--transition);
}
.mcp-client-tab:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-ghost);
}
.mcp-client-tab.active {
  background: var(--primary);
  border-color: var(--primary-strong);
  color: #fff;
  box-shadow: 0 1px 2px rgba(0, 56, 48, 0.18);
}
.mcp-client-tab:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}
.mcp-client-panel h4 {
  margin: 0 0 0.5rem;
  font-size: 0.98rem;
  font-family: var(--font-semibold);
  color: var(--text);
}
.mcp-client-panel .muted {
  margin: 0.65rem 0 0;
  font-size: 0.85rem;
  color: var(--muted);
}

/* Wide screens: capability cards fill stage */
.mcp-cap-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: 1fr;
}
@media (min-width: 720px) {
  .mcp-cap-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (min-width: 1100px) {
  .mcp-cap-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
.mcp-cap-card {
  padding: 0.8rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}
.mcp-cap-title {
  margin: 0 0 0.4rem;
  font-size: 0.88rem;
  font-weight: 600;
  font-family: var(--font-semibold);
  color: var(--text);
}
.mcp-cap-card .mcp-list {
  margin: 0;
  font-size: 0.85rem;
}

.mcp-prompt-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
}
@media (min-width: 960px) {
  .mcp-prompt-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.mcp-prompt-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.65rem;
  align-items: start;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}
.mcp-prompt-num {
  display: inline-grid;
  place-items: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 0.75rem;
  font-weight: 700;
  font-family: var(--font-semibold);
  flex-shrink: 0;
}
.mcp-prompt-quote {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.45;
  color: var(--text);
  font-style: normal;
}
.mcp-copy-prompt { white-space: nowrap; align-self: center; }
.mcp-copied {
  outline: 2px solid color-mix(in srgb, var(--success) 55%, transparent);
  outline-offset: 1px;
}

.mcp-details {
  margin-top: 0.55rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.45rem 0.75rem;
  background: var(--surface);
  font-size: 0.9rem;
}
.mcp-details summary {
  cursor: pointer;
  font-weight: 600;
  font-family: var(--font-semibold);
  color: var(--text);
  padding: 0.25rem 0;
}
.mcp-details summary:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
  border-radius: 4px;
}
.mcp-details p {
  margin: 0.4rem 0 0.55rem;
  color: var(--muted);
  line-height: 1.45;
}
.mcp-code {
  margin: 0.5rem 0;
  padding: 0.75rem 0.85rem;
  background: var(--ink-800);
  color: #f5f6f4;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  overflow-x: auto;
  line-height: 1.45;
  border: 1px solid var(--ink-900);
}
.mcp-trouble {
  display: grid;
  gap: 0.4rem;
}
@media (min-width: 900px) {
  .mcp-trouble {
    grid-template-columns: 1fr 1fr;
  }
}
.mcp-trouble .mcp-details { margin-top: 0; }

.mcp-grants-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  margin-bottom: 0.75rem;
}
.mcp-grants-count {
  margin: 0;
  font-size: 0.9rem;
}

.mcp-grant-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.5rem;
}
@media (min-width: 900px) {
  .mcp-grant-list {
    grid-template-columns: 1fr 1fr;
  }
}
.mcp-grant-item {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: center;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}
.mcp-grant-meta {
  display: grid;
  gap: 0.15rem;
  min-width: 0;
}
.mcp-grant-detail { font-size: 0.85rem; color: var(--muted); }
.mcp-grant-id {
  font-size: 0.75rem;
  word-break: break-all;
  color: var(--muted);
}
.mcp-empty-grants {
  padding: 0.9rem 1rem;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}
.mcp-empty-grants p { margin: 0; color: var(--muted); }
.mcp-footnote {
  margin: 0.75rem 0 0;
  font-size: 0.85rem;
  line-height: 1.45;
  color: var(--muted);
}

.mcp-dl {
  margin: 0;
  display: grid;
  gap: 0.55rem;
  font-size: 0.88rem;
}
@media (min-width: 720px) {
  .mcp-dl {
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem 1.25rem;
  }
}
.mcp-dl > div {
  display: grid;
  gap: 0.15rem;
  padding: 0.55rem 0.7rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}
.mcp-dl dt {
  margin: 0;
  font-weight: 600;
  font-family: var(--font-semibold);
  color: var(--text);
}
.mcp-dl dd {
  margin: 0;
  color: var(--muted);
  word-break: break-all;
}
.mcp-dl code {
  font-size: 0.82rem;
  color: var(--text);
}

@media (max-width: 520px) {
  .mcp-prompt-item {
    grid-template-columns: auto 1fr;
  }
  .mcp-prompt-item .mcp-copy-prompt {
    grid-column: 2;
    justify-self: start;
  }
  .mcp-url-row .btn-primary {
    width: 100%;
  }
}

/* ════════════════════════════════════════════════════════════════════
   FILTER SELECTS — drop native OS chrome, align to sibling inputs
   Selects kept `appearance:auto`, so they rendered the platform arrow and
   sat 36px/8px-radius next to 38px/10px-radius inputs in the same row.
   ════════════════════════════════════════════════════════════════════ */

.filters-grid select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding: 9px 34px 9px 12px;
  border-radius: var(--radius-sm);
  /* !important: a global `select { background: #fff !important }` uses the
     shorthand, which resets background-image and outranks a plain longhand. */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%232f3631' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6.5 8 10.5 12 6.5'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 11px center !important;
  background-size: 15px 15px !important;
  cursor: pointer;
}

/* ════════════════════════════════════════════════════════════════════
   ADMIN RAIL BRAND — stack the label under the wordmark
   The single-line "Administration" label needs ~100px beside a 114px
   wordmark, but the rail header only affords 199px before the collapse
   toggle — so it used to overflow its box and run under the button.
   Stacking keeps the word intact; the portal lockup is untouched.
   ════════════════════════════════════════════════════════════════════ */

.rail-brand--stacked {
  flex-wrap: wrap;
  gap: 0.2rem 0.7rem;
}

.rail-brand--stacked .rail-brand-text {
  flex-basis: 100%;
}

/* ════════════════════════════════════════════════════════════════════
   SHELL & COMPONENT MODERNIZATION (2026)
   Shared portal + admin refresh: denser spacing, consistent radius /
   elevation, clearer hierarchy. Avenia tokens only — no indigo/Inter.
   Cascades last for shell/chrome; Accueil hierarchy block above remains
   the dashboard-specific peak (metrics / deadlines / explore).
   ════════════════════════════════════════════════════════════════════ */

/* ——— Page canvas ——— */
body {
  background:
    radial-gradient(1000px 560px at 92% -10%, rgba(182, 226, 74, 0.07), transparent 58%),
    radial-gradient(820px 580px at -12% 105%, rgba(0, 77, 67, 0.035), transparent 55%),
    var(--bg);
}

/* ——— Topbar: quieter frosted chrome ——— */
body.has-app-shell .topbar {
  height: 54px;
  padding: 0 1.35rem;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
  background: color-mix(in srgb, #ffffff 88%, transparent);
  backdrop-filter: blur(14px) saturate(1.15);
  -webkit-backdrop-filter: blur(14px) saturate(1.15);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.65) inset;
}

body.has-app-shell .topbar-actions {
  gap: 0.55rem;
}

body.has-app-shell .topbar-user-label {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--muted) !important;
}

.topbar-link {
  border-radius: var(--radius-pill);
  padding: 0.48rem 0.95rem;
  font-size: 0.84rem;
  font-weight: 600;
  font-family: var(--font-semibold);
  border: 1px solid color-mix(in srgb, var(--line) 85%, transparent);
  background: var(--surface);
  transition:
    background var(--transition),
    border-color var(--transition),
    color var(--transition),
    box-shadow var(--transition);
}

.topbar-link:hover {
  border-color: color-mix(in srgb, var(--primary) 35%, var(--line));
  color: var(--primary);
  background: color-mix(in srgb, var(--primary-soft) 55%, #fff);
  box-shadow: var(--shadow-sm);
}

.nav-burger {
  border-radius: var(--radius-sm);
  border-color: color-mix(in srgb, var(--line) 80%, transparent);
  transition:
    background var(--transition),
    border-color var(--transition),
    color var(--transition),
    box-shadow var(--transition);
}

.nav-burger:hover {
  background: var(--primary-soft);
  border-color: color-mix(in srgb, var(--primary) 28%, var(--line));
  color: var(--primary);
}

/* ——— Rail: darkgreen + lime active (brand signature) ——— */
.app-rail {
  padding: 0.95rem 0.85rem 1rem;
  gap: 0.75rem;
  background:
    radial-gradient(480px 320px at 0% 0%, rgba(182, 226, 74, 0.1), transparent 52%),
    linear-gradient(180deg, #16241f 0%, #24302c 48%, #2a342f 100%) !important;
  border-right: 1px solid rgba(255, 255, 255, 0.055);
}

.rail-nav.tabs {
  gap: 0.2rem;
}

.rail-nav .tab {
  border-radius: 10px;
  padding: 0.62rem 0.75rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: rgba(238, 242, 239, 0.78);
  transition:
    background 150ms ease,
    color 150ms ease,
    box-shadow 150ms ease;
}

.rail-nav .tab:hover:not(.active),
.app-rail .tab:hover:not(.active) {
  background: rgba(255, 255, 255, 0.07) !important;
  color: #fff !important;
}

/* Soft lime wash only — no inset left bar (would curve with tab radius) */
.rail-nav .tab.active,
.app-rail .tab.active,
.rail-nav .tab.active:hover,
.app-rail .tab.active:hover {
  background: color-mix(in srgb, var(--brand-lime) 16%, rgba(255, 255, 255, 0.06)) !important;
  color: #ffffff !important;
  box-shadow: none !important;
  font-weight: 650;
}

.rail-nav .tab.active .rail-tab-dot,
.app-rail .tab.active .rail-tab-dot {
  background: var(--brand-lime) !important;
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--brand-lime) 30%, transparent);
}

.rail-nav-section-label {
  font-size: 0.68rem !important;
  letter-spacing: 0.08em !important;
  color: rgba(255, 255, 255, 0.48) !important;
}

.rail-toggle {
  border-radius: 9px;
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  transition:
    background var(--transition),
    color var(--transition),
    border-color var(--transition);
}

.rail-toggle:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.rail-foot {
  border-top-color: rgba(255, 255, 255, 0.07);
  padding-top: 0.7rem;
}

/* ——— Stage content density ——— */
body.has-app-shell .app-shell {
  height: calc(100vh - 54px);
  height: calc(100dvh - 54px);
}

body.is-impersonating.has-app-shell .app-shell {
  height: calc(100vh - 54px - 44px);
  height: calc(100dvh - 54px - 44px);
}

.app-stage {
  padding: 1.1rem 1.35rem 2rem;
  background:
    radial-gradient(ellipse 60% 40% at 100% 0%, rgba(0, 77, 67, 0.035), transparent 55%),
    radial-gradient(ellipse 45% 32% at 0% 100%, rgba(182, 226, 74, 0.03), transparent 50%),
    var(--bg);
}

/* Admin stage keeps flex padding on children; tighten content insets */
.app-shell--admin .app-stage > .tab-panel:not(.hidden) > .dashboard,
.app-shell--admin .app-stage > .tab-panel:not(.hidden) > .tab-shell {
  padding: 1.1rem 1.35rem 2rem;
}

.tab-shell {
  gap: 0.85rem;
  padding-bottom: 1.35rem;
}

.tab-toolbar {
  padding: 0.95rem 1.15rem !important;
  border-radius: var(--radius-md);
  border: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
  background:
    linear-gradient(180deg, #ffffff 0%, color-mix(in srgb, var(--surface-2) 55%, #fff) 100%);
  box-shadow: var(--shadow-sm) !important;
}

.tab-toolbar h2 {
  font-family: var(--font-display);
  font-weight: 400 !important;
  font-size: 1.22rem !important;
  letter-spacing: -0.02em !important;
}

.tab-count {
  border-radius: var(--radius-pill);
  background: color-mix(in srgb, var(--primary-soft) 70%, #fff);
  border: 1px solid color-mix(in srgb, var(--primary) 18%, var(--line));
  color: var(--primary);
  font-weight: 700;
  padding: 0.4rem 0.8rem;
}

/* ——— Buttons: unified pill language ——— */
.btn-primary,
button.btn-primary {
  border-radius: var(--radius-pill);
  min-height: var(--control-h);
  padding: 0.55rem 1.2rem;
  font-family: var(--font-semibold);
  font-weight: 650;
  letter-spacing: 0.01em;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.12) inset,
    0 1px 3px rgba(0, 56, 48, 0.18) !important;
  transition:
    background 160ms ease,
    border-color 160ms ease,
    box-shadow 140ms ease,
    transform 120ms ease,
    opacity 120ms ease;
}

.btn-primary:hover,
button.btn-primary:hover {
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.14) inset,
    0 4px 12px -2px rgba(0, 56, 48, 0.28) !important;
}

.btn-secondary,
button.btn-secondary {
  border-radius: var(--radius-pill);
  min-height: var(--control-h);
  padding: 0.5rem 1.05rem;
  font-family: var(--font-semibold);
  font-weight: 600;
  border-color: color-mix(in srgb, var(--line) 90%, transparent);
  box-shadow: var(--shadow-sm);
  transition:
    background var(--transition),
    border-color var(--transition),
    color var(--transition),
    box-shadow var(--transition);
}

.btn-secondary:hover,
button.btn-secondary:hover {
  border-color: color-mix(in srgb, var(--primary) 32%, var(--line));
  background: color-mix(in srgb, var(--primary-soft) 50%, #fff);
  box-shadow: var(--shadow-sm);
}

.btn-soft {
  border-radius: var(--radius-pill);
  font-family: var(--font-semibold);
  font-weight: 600;
  border-color: color-mix(in srgb, var(--line) 85%, transparent);
  transition:
    background var(--transition),
    border-color var(--transition),
    color var(--transition),
    box-shadow var(--transition);
}

.agent-btn--search {
  border-radius: var(--radius-pill) !important;
  min-height: var(--control-h);
  font-family: var(--font-semibold);
  font-weight: 650 !important;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.12) inset,
    0 1px 3px rgba(0, 56, 48, 0.18) !important;
}

/* Login submit uses same primary language */
.login-form button[type="submit"],
.auth-screen .login-form button[type="submit"] {
  border-radius: var(--radius-pill);
  min-height: 2.75rem;
  font-family: var(--font-semibold);
  font-weight: 650;
  background: var(--primary) !important;
  color: #fff !important;
  border: 1px solid var(--primary-strong);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.12) inset,
    0 2px 8px rgba(0, 56, 48, 0.22);
  transition:
    background 160ms ease,
    box-shadow 140ms ease,
    transform 120ms ease;
}

.login-form button[type="submit"]:hover,
.auth-screen .login-form button[type="submit"]:hover {
  background: var(--primary-strong) !important;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.14) inset,
    0 4px 14px -2px rgba(0, 56, 48, 0.3);
}

/* ——— Chips & badges ——— */
.chip,
.filter-pill {
  border-radius: var(--radius-pill);
  border-color: color-mix(in srgb, var(--line) 88%, transparent);
  font-family: var(--font-semibold);
  transition:
    background var(--transition),
    border-color var(--transition),
    color var(--transition),
    box-shadow var(--transition);
}

.chip:hover,
.filter-pill:hover {
  border-color: color-mix(in srgb, var(--primary) 28%, var(--line));
  background: color-mix(in srgb, var(--primary-soft) 40%, #fff);
}

.chip.active,
.chip[aria-selected="true"],
.filter-pill.active {
  background: var(--primary) !important;
  color: #fff !important;
  border-color: var(--primary-strong) !important;
  box-shadow: 0 1px 3px rgba(0, 56, 48, 0.18);
}

.badge {
  border-radius: var(--radius-pill);
  letter-spacing: 0.04em;
}

/* ——— Cards / tiles / panels ——— */
/* Exclude .tab-toolbar: headers use class="tab-toolbar panel" and must keep toolbar craft */
.panel:not(.tab-toolbar) {
  border-radius: var(--radius-md);
  border: 1px solid color-mix(in srgb, var(--line) 82%, transparent);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  padding: 1.1rem 1.2rem;
}

/* Dual-class headers: toolbar gradient wins over plain panel surface */
.tab-toolbar.panel {
  background:
    linear-gradient(180deg, #ffffff 0%, color-mix(in srgb, var(--surface-2) 55%, #fff) 100%);
  box-shadow: var(--shadow-sm) !important;
  padding: 0.95rem 1.15rem !important;
}

.tile,
.corpus-tile {
  border-radius: var(--radius-md) !important;
  border: 1px solid color-mix(in srgb, var(--line) 78%, transparent) !important;
  background:
    linear-gradient(180deg, #ffffff 0%, #fbfcf9 100%) !important;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.92) inset,
    var(--shadow-sm) !important;
  padding: 1rem 1.1rem;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms cubic-bezier(0.22, 1, 0.36, 1),
    background 160ms ease !important;
}

.tile:hover,
.tile.card-click:hover,
.corpus-tile:hover {
  border-color: color-mix(in srgb, var(--primary) 28%, var(--line)) !important;
  background:
    linear-gradient(165deg, #ffffff 0%, color-mix(in srgb, var(--primary-soft) 28%, #fff) 100%) !important;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.95) inset,
    0 2px 6px rgba(18, 33, 27, 0.05),
    0 16px 32px -14px rgba(0, 77, 67, 0.18) !important;
  transform: translateY(-2px);
}

.admin-record-panel {
  border-radius: var(--radius-md);
  border-color: color-mix(in srgb, var(--line) 80%, transparent) !important;
  box-shadow: var(--shadow-sm);
}

.agent-bar {
  border-radius: var(--radius-md) !important;
  border: 1px solid color-mix(in srgb, var(--primary) 14%, var(--line)) !important;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--primary-soft) 35%, #fff) 0%, #fff 55%) !important;
  box-shadow: var(--shadow-sm) !important;
  padding: 1rem 1.15rem !important;
}

.agent-search-inline textarea {
  border-radius: var(--radius-sm) !important;
  min-height: 58px !important;
  border-color: color-mix(in srgb, var(--line) 90%, transparent) !important;
}

.agent-badge,
/* ——— Filters & forms ——— */
.filters-compact {
  border-radius: var(--radius-md);
  border: 1px solid color-mix(in srgb, var(--line) 80%, transparent) !important;
  background:
    linear-gradient(180deg, #ffffff 0%, var(--surface-2) 100%) !important;
  box-shadow: var(--shadow-sm);
  padding: 0.9rem 1.05rem !important;
}

.filters-compact .filters-grid {
  gap: 0.6rem 0.7rem;
}

.filters-compact label,
.filters-grid label,
.login-form label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
  gap: 0.35rem;
}

.filters-compact input,
.filters-compact select,
.filters-grid input,
.filters-grid select,
.login-form input,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
input[type="number"],
input[type="date"],
select,
textarea {
  min-height: var(--control-h);
  border-radius: var(--radius-sm) !important;
  border: 1px solid var(--border-strong) !important;
  /* background-color only — shorthand would wipe custom select chevrons */
  background-color: #fff !important;
  padding: 0.5rem 0.75rem;
  transition:
    border-color var(--transition),
    box-shadow var(--transition),
    background-color var(--transition);
}

.filters-compact input:hover,
.filters-compact select:hover,
.filters-grid input:hover,
.filters-grid select:hover,
.login-form input:hover {
  border-color: color-mix(in srgb, var(--primary) 22%, var(--border-strong)) !important;
}

.filters-compact input:focus,
.filters-compact select:focus,
.filters-grid input:focus,
.filters-grid select:focus,
.login-form input:focus,
input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary) !important;
  box-shadow: var(--focus-ring) !important;
  outline: none;
}

.filters-grid select {
  padding-right: 2.1rem;
}

/* ——— Auth surface ——— */
.auth-screen .login-panel,
.login-panel {
  border-radius: var(--radius-lg);
  border: 1px solid color-mix(in srgb, var(--line) 75%, transparent);
  box-shadow: var(--shadow);
  background: var(--surface);
}

.auth-screen .login-form input {
  min-height: 2.65rem;
  border-radius: var(--radius-sm) !important;
}

/* ——— List / admin rows ——— */
.admin-list-body .admin-row,
.admin-row {
  border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
  background: var(--surface);
  transition:
    background 140ms ease,
    border-color 140ms ease,
    box-shadow 140ms ease;
}

.admin-list-body .admin-row:hover,
.admin-row:hover {
  border-color: color-mix(in srgb, var(--primary) 22%, var(--line));
  background: color-mix(in srgb, var(--primary) 3.5%, #fff);
  box-shadow: var(--shadow-sm);
}

.admin-row.is-selected {
  border-color: color-mix(in srgb, var(--primary) 35%, var(--line)) !important;
  background: color-mix(in srgb, var(--primary-soft) 40%, #fff) !important;
  box-shadow: var(--shadow-sm) !important;
}

/* ——— Tables ——— */
.data-table th {
  background: color-mix(in srgb, var(--surface-2) 80%, #fff);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 85%, transparent);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
}

.data-table tbody tr:hover td {
  background: color-mix(in srgb, var(--primary) 4%, #fff);
}

/* ——— Notifications ——— */
.notif-bell {
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition:
    background var(--transition),
    border-color var(--transition),
    color var(--transition),
    box-shadow var(--transition);
}

.notif-bell:hover {
  border-color: color-mix(in srgb, var(--primary) 28%, var(--line));
  background: color-mix(in srgb, var(--primary-soft) 45%, #fff);
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.notif-panel {
  border-radius: var(--radius-md) !important;
  border: 1px solid color-mix(in srgb, var(--line) 78%, transparent) !important;
  box-shadow: var(--shadow-md) !important;
  overflow: hidden;
}

.notif-panel-head {
  background: linear-gradient(180deg, color-mix(in srgb, var(--primary-soft) 22%, #fff), #fff);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
}

/* ——— Tickets: quiet list rows (no elevated card chrome) ——— */
.ticket-inbox-card {
  border: none !important;
  border-bottom: 1px solid var(--line) !important;
  border-radius: 0 !important;
  background: var(--surface) !important;
  box-shadow: none !important;
  transition: background 140ms ease;
}

.ticket-inbox-card:last-child {
  border-bottom: none !important;
}

.ticket-inbox-card:hover {
  border-color: transparent !important;
  border-bottom-color: var(--line) !important;
  background: var(--surface-2) !important;
  box-shadow: none !important;
}

.ticket-thread {
  border: none !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

/* ——— Corpus interest / hero bars ——— */
.corpus-interest-bar {
  border-radius: var(--radius-md);
  border-color: color-mix(in srgb, var(--line) 80%, transparent) !important;
  box-shadow: var(--shadow-sm);
}

/* ——— Horizontal content tabs (non-rail) ——— */
.tabs:not(.rail-nav) {
  border-radius: var(--radius-pill);
  border: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  padding: 0.28rem;
  gap: 0.28rem;
}

.tabs:not(.rail-nav) .tab {
  border-radius: var(--radius-pill);
  font-weight: 600;
  transition:
    background var(--transition),
    color var(--transition),
    box-shadow var(--transition);
}

.tabs:not(.rail-nav) .tab.active {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 1px 4px rgba(0, 56, 48, 0.22);
}

/* ——— Greeting: density only — keep brand craft radials / lime edge from base ——— */
.dashboard .dash-greet {
  padding: 1.05rem 1.2rem;
}

/* Tighter dashboard vertical rhythm without flattening elevated craft */
.dashboard {
  gap: 1.25rem;
}

.dashboard .dash-explore {
  gap: 0.9rem;
}

.empty-state,
.dashboard .dash-empty {
  border-radius: var(--radius-md);
}

/* Admin rich hero: keep peak weight, soft edge on light stage */
.dashboard > .dash-hero--rich {
  border-radius: var(--radius-lg);
  border: 1px solid color-mix(in srgb, var(--ink-800) 55%, transparent);
}

/* ——— MCP / secondary panels ——— */
.mcp-hero,
.mcp-cap-card,
.mcp-prompt-item,
.mcp-grant-item {
  border-radius: var(--radius-md);
  border-color: color-mix(in srgb, var(--line) 80%, transparent);
  box-shadow: var(--shadow-sm);
}

.mcp-client-tab {
  border-radius: var(--radius-pill);
}

/* ——— Mobile shell (≤900px) ——— */
/* Keep topbar height 48px in lockstep with fixed-topbar margin-top:48px reserve
   (see mobile shell block ~2648). Do not set 52px without updating margin-top. */
@media (max-width: 900px) {
  body.has-app-shell .topbar {
    height: 48px;
    min-height: 48px;
    padding: 0 0.85rem;
  }

  body.has-app-shell .app-shell {
    height: calc(100vh - 48px);
    height: calc(100dvh - 48px);
    margin-left: 0;
    margin-top: 48px;
  }

  .app-stage {
    padding: 0.9rem 0.85rem 1.4rem;
  }

  .tab-toolbar {
    padding: 0.8rem 0.9rem !important;
  }

  .tab-toolbar.panel {
    padding: 0.8rem 0.9rem !important;
  }

  .filters-compact {
    padding: 0.75rem 0.85rem !important;
  }

  .tile,
  .corpus-tile {
    padding: 0.9rem 0.95rem;
  }

  .tile:hover,
  .tile.card-click:hover,
  .corpus-tile:hover {
    transform: translateY(-1px);
  }
}

/* ——— Reduced motion: kill modern lifts ——— */
@media (prefers-reduced-motion: reduce) {
  .tile:hover,
  .tile.card-click:hover,
  .corpus-tile:hover,
  .dashboard .dash-metric:hover,
  .dashboard .dash-metric--rich:hover {
    transform: none !important;
  }

  .btn-primary,
  button.btn-primary,
  .btn-secondary,
  button.btn-secondary,
  .topbar-link,
  .chip,
  .filter-pill,
  .rail-nav .tab,
  .tile,
  .corpus-tile,
  .admin-row {
    transition: none !important;
  }
}

/* Re-assert filter select chevron after modernization field fills
   (background-color is safe; keep image longhands winning). */
.filters-grid select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding: 9px 34px 9px 12px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%232f3631' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6.5 8 10.5 12 6.5'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 11px center !important;
  background-size: 15px 15px !important;
}

/* ════════════════════════════════════════════════════════════════════
   NO LEFT-CURVED BORDERS
   Left accent strips are square flush edges only — never pill / curved
   “AI bars” (border-radius 0 N N 0) on cards, greet, metrics, tickets.
   ════════════════════════════════════════════════════════════════════ */

.dash-greet::before,
.dashboard .dash-metric--rich::before,
.dash-metric--rich::before {
  border-radius: 0 !important;
}

.ticket-inbox-card-accent {
  display: none !important;
}

/* Rail active: fill only — never inset left stroke (curves with tab radius) */
.rail-nav .tab.active,
.app-rail .tab.active,
.rail-nav .tab.active:hover,
.app-rail .tab.active:hover {
  box-shadow: none !important;
}

.rail-nav .tab.active::before,
.app-rail .tab.active::before,
.rail-nav .tab::before,
.app-rail .tab::before {
  content: none !important;
  display: none !important;
  border-radius: 0 !important;
}

/* ════════════════════════════════════════════════════════════════════
   CORPUS TILE STATUS WASH — light left→right gradient per urgency tone
   Wins over elevated-tile + contrast-pass !important layers.
   critical = red · soon = amber · mid = teal · closed = violet
   ════════════════════════════════════════════════════════════════════ */

.dd-pill--closed {
  background: #f5f3ff !important;
  color: #5b21b6 !important;
  border: 1px solid rgba(109, 40, 217, 0.22) !important;
}

.corpus-tile.is-closed .dd-datechip,
.dash-deadline-row.is-closed .dd-datechip {
  background: #f5f3ff !important;
  border-color: rgba(109, 40, 217, 0.22) !important;
}

.corpus-tile.is-closed .dd-datechip strong,
.dash-deadline-row.is-closed .dd-datechip strong {
  color: #5b21b6 !important;
}

.corpus-ava.corpus-ava--violet {
  background: linear-gradient(145deg, #f5f3ff, #ede9fe) !important;
  color: #5b21b6 !important;
  border: 1px solid rgba(109, 40, 217, 0.22) !important;
}

/* Shared recipe: soft hue on the left → white on the right */
.corpus-tile.is-critical {
  border-color: color-mix(in srgb, #b42318 20%, var(--line)) !important;
  background: linear-gradient(
    90deg,
    color-mix(in srgb, #b42318 7%, #fff) 0%,
    #ffffff 78%
  ) !important;
}

.corpus-tile.is-soon {
  border-color: color-mix(in srgb, #b45309 20%, var(--line)) !important;
  background: linear-gradient(
    90deg,
    color-mix(in srgb, #b45309 7%, #fff) 0%,
    #ffffff 78%
  ) !important;
}

.corpus-tile.is-mid {
  border-color: color-mix(in srgb, var(--primary) 18%, var(--line)) !important;
  background: linear-gradient(
    90deg,
    color-mix(in srgb, var(--primary) 7%, #fff) 0%,
    #ffffff 78%
  ) !important;
}

.corpus-tile.is-closed {
  border-color: color-mix(in srgb, #7c3aed 20%, var(--line)) !important;
  background: linear-gradient(
    90deg,
    color-mix(in srgb, #7c3aed 8%, #fff) 0%,
    #ffffff 78%
  ) !important;
}

.corpus-tile.is-critical:hover {
  border-color: color-mix(in srgb, #b42318 32%, var(--line)) !important;
  background: linear-gradient(
    90deg,
    color-mix(in srgb, #b42318 11%, #fff) 0%,
    #ffffff 72%
  ) !important;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.95) inset,
    0 2px 6px rgba(18, 33, 27, 0.05),
    0 16px 32px -14px rgba(180, 35, 24, 0.18) !important;
}

.corpus-tile.is-soon:hover {
  border-color: color-mix(in srgb, #b45309 32%, var(--line)) !important;
  background: linear-gradient(
    90deg,
    color-mix(in srgb, #b45309 11%, #fff) 0%,
    #ffffff 72%
  ) !important;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.95) inset,
    0 2px 6px rgba(18, 33, 27, 0.05),
    0 16px 32px -14px rgba(180, 83, 9, 0.18) !important;
}

.corpus-tile.is-mid:hover {
  border-color: color-mix(in srgb, var(--primary) 30%, var(--line)) !important;
  background: linear-gradient(
    90deg,
    color-mix(in srgb, var(--primary) 11%, #fff) 0%,
    #ffffff 72%
  ) !important;
}

.corpus-tile.is-closed:hover {
  border-color: color-mix(in srgb, #7c3aed 32%, var(--line)) !important;
  background: linear-gradient(
    90deg,
    color-mix(in srgb, #7c3aed 12%, #fff) 0%,
    #ffffff 72%
  ) !important;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.95) inset,
    0 2px 6px rgba(18, 33, 27, 0.05),
    0 16px 32px -14px rgba(109, 40, 217, 0.2) !important;
}


/* —— In-app Documentation (docsKit) — Stratum —— */
.tab-shell--docs {
  width: 100%;
  max-width: none;
}
.docs-root {
  width: 100%;
  max-width: none;
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
}
.docs-page {
  display: grid;
  gap: 0.85rem;
  width: 100%;
}
.docs-hero {
  padding: 1.1rem 1.2rem 1.2rem;
}
.docs-hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.5rem;
}
.docs-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.72rem;
  font-weight: 600;
  font-family: var(--font-semibold);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary);
  border: 1px solid color-mix(in srgb, var(--primary) 18%, transparent);
}
.docs-badge--staff {
  background: var(--success-soft);
  color: var(--success);
  border-color: color-mix(in srgb, var(--success) 22%, transparent);
}
.docs-badge--company {
  background: var(--primary-soft);
  color: var(--primary);
}
.docs-badge--muted {
  background: var(--surface-2);
  color: var(--muted);
  border-color: var(--line);
}
.docs-hero-title {
  margin: 0 0 0.35rem;
  font-size: 1.35rem;
  font-family: var(--font-display, var(--font-semibold));
  letter-spacing: -0.02em;
  color: var(--ink);
}
.docs-hero-lead {
  margin: 0;
  color: var(--muted);
  max-width: 48rem;
  line-height: 1.5;
}
.docs-layout {
  display: grid;
  gap: 0.85rem;
  align-items: start;
}
@media (min-width: 960px) {
  .docs-layout {
    grid-template-columns: minmax(12rem, 15rem) minmax(0, 1fr);
  }
}
.docs-toc {
  padding: 0.85rem 1rem;
  position: sticky;
  top: 0.75rem;
}
.docs-toc-title {
  margin: 0 0 0.5rem;
  font-size: 0.72rem;
  font-weight: 600;
  font-family: var(--font-semibold);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.docs-toc-list {
  margin: 0;
  padding: 0 0 0 1.1rem;
  display: grid;
  gap: 0.35rem;
  font-size: 0.88rem;
  line-height: 1.35;
}
.docs-toc-link {
  color: var(--ink);
  text-decoration: none;
}
.docs-toc-link:hover {
  color: var(--primary);
  text-decoration: underline;
}
@media (max-width: 959px) {
  .docs-toc {
    position: static;
  }
  .docs-toc-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.75rem;
    padding-left: 0;
    list-style: none;
  }
  .docs-toc-list > li {
    margin: 0;
  }
  .docs-toc-link {
    display: inline-flex;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    background: var(--surface-2);
    border: 1px solid var(--line);
    font-size: 0.8rem;
  }
}
.docs-main {
  display: grid;
  gap: 0.75rem;
  min-width: 0;
}
.docs-section {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: 1rem 1.15rem 1.15rem;
  scroll-margin-top: 1rem;
}
.docs-h2 {
  margin: 0 0 0.65rem;
  font-size: 1.1rem;
  font-family: var(--font-semibold);
  color: var(--ink);
  letter-spacing: -0.01em;
}
.docs-h3 {
  margin: 0.9rem 0 0.4rem;
  font-size: 0.95rem;
  font-family: var(--font-semibold);
  color: var(--ink);
}
.docs-body {
  color: var(--ink);
  font-size: 0.95rem;
  line-height: 1.55;
}
.docs-body > p {
  margin: 0 0 0.65rem;
}
.docs-body > p:last-child {
  margin-bottom: 0;
}
.docs-list,
.docs-list-ol {
  margin: 0 0 0.75rem;
  padding-left: 1.25rem;
  display: grid;
  gap: 0.35rem;
}
.docs-list code,
.docs-body code {
  font-size: 0.88em;
  padding: 0.08em 0.35em;
  border-radius: 0.3rem;
  background: var(--surface-2);
  border: 1px solid var(--line);
}
.docs-callout {
  margin: 0.75rem 0;
  padding: 0.7rem 0.85rem;
  border-radius: var(--radius-sm, 0.5rem);
  border: 1px solid var(--line);
  background: var(--surface-2);
}
.docs-callout p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}
.docs-callout--info {
  border-color: color-mix(in srgb, var(--primary) 28%, var(--line));
  background: color-mix(in srgb, var(--primary) 7%, var(--surface));
}
.docs-callout--warn {
  border-color: color-mix(in srgb, #b45309 30%, var(--line));
  background: color-mix(in srgb, #b45309 8%, var(--surface));
}
.docs-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.85rem;
}
.docs-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0.5rem 0 0.85rem;
  font-size: 0.9rem;
}
.docs-table th,
.docs-table td {
  text-align: left;
  vertical-align: top;
  padding: 0.5rem 0.6rem;
  border: 1px solid var(--line);
}
.docs-table th {
  background: var(--surface-2);
  font-family: var(--font-semibold);
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.02em;
}
.docs-table td {
  background: var(--surface);
}

/* —— Animateur Priorités (7 j.) — BRIEFING DU JOUR columns (member craft) —— */

/* Soft panel body: breathing room around the 3 columns */
.dashboard .dash-section--priorities.dash-section--briefing {
  overflow: visible;
}

.dashboard .dash-section--priorities .dash-brief-grid {
  padding: 0.95rem 1.15rem 1.15rem;
}

/* 3 columns (Marchés / Financements / Actualités) — fixed height, list scrolls */
.dashboard .dash-brief-grid--priorities,
.dash-brief-grid--priorities {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
}

.dashboard .dash-brief-grid--priorities .dash-brief-col,
.dash-brief-grid--priorities .dash-brief-col {
  /* Tall enough for ~3 priority items + chrome; never grow with content */
  height: 36rem;
  min-height: 36rem;
  max-height: 36rem;
  overflow: hidden;
}

.dashboard .dash-brief-grid--priorities .dash-brief-col-head,
.dashboard .dash-brief-grid--priorities .dash-brief-count,
.dashboard .dash-brief-grid--priorities .dash-brief-footer,
.dash-brief-grid--priorities .dash-brief-col-head,
.dash-brief-grid--priorities .dash-brief-count,
.dash-brief-grid--priorities .dash-brief-footer {
  flex-shrink: 0;
}

/* Scrollable body: list or empty state fills remaining column height */
.dashboard .dash-brief-grid--priorities .dash-brief-list,
.dashboard .dash-brief-grid--priorities .dash-brief-empty,
.dash-brief-grid--priorities .dash-brief-list,
.dash-brief-grid--priorities .dash-brief-empty {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

/* Empty state: center in the scroll region without looking cramped */
.dashboard .dash-brief-grid--priorities .dash-brief-empty,
.dash-brief-grid--priorities .dash-brief-empty {
  display: flex;
  align-items: center;
  padding-right: 0.15rem;
}

/* Subtle scrollbar so long queues stay usable */
.dashboard .dash-brief-grid--priorities .dash-brief-list::-webkit-scrollbar,
.dash-brief-grid--priorities .dash-brief-list::-webkit-scrollbar {
  width: 6px;
}

.dashboard .dash-brief-grid--priorities .dash-brief-list::-webkit-scrollbar-thumb,
.dash-brief-grid--priorities .dash-brief-list::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--line) 90%, var(--muted));
  border-radius: 999px;
}

.dashboard .dash-brief-grid--priorities .dash-brief-list,
.dash-brief-grid--priorities .dash-brief-list {
  scrollbar-width: thin;
  scrollbar-color: color-mix(in srgb, var(--line) 90%, var(--muted)) transparent;
  padding-right: 0.2rem;
  padding-bottom: 0.35rem;
}

@media (max-width: 1100px) {
  .dashboard .dash-brief-grid--priorities,
  .dash-brief-grid--priorities {
    grid-template-columns: 1fr;
  }

  .dashboard .dash-brief-grid--priorities .dash-brief-col,
  .dash-brief-grid--priorities .dash-brief-col {
    height: 30rem;
    min-height: 30rem;
    max-height: 30rem;
  }
}

/* Priority item: clickable brief card (opens focused corpus record) */
.dashboard .dash-brief-card--priority,
.dash-brief-card--priority {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0.55rem 0.65rem 0.6rem;
  border: 0;
  background: transparent;
  font: inherit;
  text-align: left;
  cursor: pointer;
  color: var(--text);
}

.dashboard .dash-priority-item-main:hover .dash-brief-card-title,
.dash-priority-item-main:hover .dash-brief-card-title {
  color: var(--primary);
}

.dashboard .dash-priority-item-main .dash-brief-card-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.dashboard .dash-priority-companies-line,
.dash-priority-companies-line {
  font-style: normal;
}

.dashboard .dash-priority-more,
.dash-priority-more {
  font-weight: 650;
  color: var(--primary);
}

/* Urgency pill variants used in priority brief cards */
.dash-brief-pill--urgent {
  color: #9a3412;
  background: color-mix(in srgb, #f59e0b 22%, #fff);
}

.dash-brief-pill--muted {
  color: var(--muted);
  background: color-mix(in srgb, var(--line) 55%, #fff);
}

.dashboard .dash-brief-col--tenders .dash-brief-pill:not(.dash-brief-pill--urgent):not(.dash-brief-pill--muted) {
  color: #9a3412;
  background: color-mix(in srgb, #f59e0b 18%, #fff);
}

.dashboard .dash-brief-col--funding .dash-brief-pill:not(.dash-brief-pill--urgent):not(.dash-brief-pill--muted) {
  color: #5b21b6;
  background: color-mix(in srgb, #7c3aed 14%, #fff);
}
