@font-face {
  font-family: SoonplyUI;
  src: url('/assets/roboto-ui-400.ttf') format('truetype');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: SoonplyUI;
  src: url('/assets/roboto-ui-500.ttf') format('truetype');
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: SoonplyUI;
  src: url('/assets/roboto-ui-600.ttf') format('truetype');
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: SoonplyUI;
  src: url('/assets/roboto-ui-700.ttf') format('truetype');
  font-weight: 700;
  font-display: swap;
}
:root {
  font-family: SoonplyUI, Arial, sans-serif;
  --muted: #6b7fb5;
  --orange: #ff4c24;
}
body[data-view='quotes'] main {
  padding: 18px 22px;
}
body[data-view='quotes'] .collection-head {
  padding: 0;
}
body[data-view='quotes'] .collection-head .page-heading {
  margin: 4px 0 10px;
}
body[data-view='quotes'] .page-heading > div {
  gap: 18px;
}
body[data-view='quotes'] .page-icon .icon {
  width: 48px;
  height: 48px;
}
body[data-view='quotes'] .page-icon {
  align-self: flex-start;
}
body[data-view='quotes'] .collection-head .tabs {
  min-height: 40px;
  margin: 10px 0;
}
body[data-view='quotes'] .collection-head .tabs > button {
  min-width: 120px;
  padding: 8px 23px;
}
body[data-view='quotes'] .collection-head .tabs > button:not(:first-child) {
  min-width: 150px;
}
body[data-view='quotes'] .filters {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 10px 0 14px;
  padding: 10px 6px;
}
body[data-view='quotes'] .filters > .view-controls {
  flex: 1 1 440px;
  min-width: 0;
  width: auto;
  max-width: none;
}
body[data-view='quotes'] .filters > .commercial-period-controls {
  flex: 0 1 auto;
  min-width: 0;
  width: auto;
  max-width: none;
}
body[data-view='quotes'] .filters > .btn {
  height: 38px;
  justify-content: flex-start;
}
body[data-view='quotes'] main > .toolbar {
  margin: 14px 0 12px;
}
body[data-view='quotes'] .quote-list-table {
  table-layout: fixed;
  min-width: 1000px;
}
.quote-list-table th {
  height: 44px;
  padding: 8px 12px;
}
.quote-list-table td {
  height: 49px;
  padding: 5px 12px;
  overflow-wrap: break-word;
}
.quote-list-table th:first-child {
  width: 4.2%;
}
.quote-list-table th:nth-child(2) {
  width: 11%;
}
.quote-list-table th:nth-child(3) {
  width: 15.5%;
}
.quote-list-table th:nth-child(4) {
  width: 16.4%;
}
.quote-list-table th:nth-child(5) {
  width: 11.2%;
}
.quote-list-table th:nth-child(6) {
  width: 13%;
}
.quote-list-table th:nth-child(7) {
  width: 12%;
}
.quote-list-table th:nth-child(8) {
  width: 10.4%;
}
.quote-list-table th:last-child {
  width: 6.3%;
}
.quote-list-table td:last-child > .btn {
  border: 0;
  background: transparent;
  width: 26px;
  min-width: 0;
  color: var(--blue);
}
.quote-list-table td:last-child > .btn .icon {
  width: 20px;
  stroke-width: 2.5;
}
.quote-list-table td .badge > .icon {
  stroke-width: 2;
}
.quote-list-table td .badge {
  white-space: nowrap;
  padding: 5px 10px;
}
.quote-list-table td.empty {
  height: 180px;
  text-align: center;
}
body[data-view='quotes'] .pagination {
  margin-top: 18px;
}
.previous-page > .icon {
  transform: rotate(180deg);
}
body[data-view='quotes'] #right-content {
  gap: 14px;
}
body[data-view='quotes'] .right-panel .quick-actions {
  gap: 6px;
  padding: 0 9px 12px;
}
body[data-view='quotes'] .right-panel .btn.quick {
  min-height: 39px;
  font-size: 14px;
  padding: 8px 10px;
}
body[data-view='quotes'] .right-panel .card-heading {
  padding: 10px 12px;
}
body[data-view='quotes'] .quote-statistics-card .card-heading {
  padding: 6px 12px;
  min-height: 46px;
}
.quote-statistics-card .card-heading > select {
  font-size: 12px;
  min-width: 0;
  max-width: 144px;
  padding: 6px 8px;
  height: 34px;
  color: var(--blue);
}
.quote-list-statistics {
  padding: 0 14px 13px;
  margin: 0;
}
.quote-list-statistics > div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 53px;
  border-bottom: 1px solid var(--line);
  gap: 8px;
}
.quote-list-statistics > div:last-child {
  border: 0;
}
.quote-list-statistics dt {
  display: flex;
  gap: 16px;
  align-items: center;
  font-size: 14px;
  color: var(--blue);
}
.quote-list-statistics dt > .icon {
  width: 24px;
  height: 24px;
  flex: none;
}
.quote-list-statistics dd {
  text-align: right;
  flex: none;
  font-size: 16px;
  margin: 0;
}
.quote-list-statistics dd > strong,
.quote-list-statistics dd > small {
  display: block;
}
.quote-list-statistics dd > strong {
  color: var(--navy);
}
.quote-list-statistics dd > small {
  font-size: 13px;
  font-weight: 400;
}
.quote-list-statistics > div:nth-child(2) dt > .icon {
  color: var(--orange);
}
.quote-list-statistics > div:nth-child(4) dt > .icon {
  color: var(--purple);
}
.quote-list-statistics > div:nth-child(5) dt > .icon {
  color: #ffb500;
}
body[data-view='quotes'] .ai-card {
  padding: 15px 13px;
  row-gap: 8px;
}
body[data-view='quotes'] .ai-card p {
  font-size: 14px;
  line-height: 1.35;
}
@media (min-width: 1300px) {
  body[data-view='quotes'] .company {
    display: flex;
  }
  body[data-view='quotes'] .global-search {
    width: min(44vw, 740px);
  }
  body[data-view='quotes'] .top-actions {
    gap: 10px;
  }
}
@media (min-width: 1300px) and (max-width: 1549px) {
  body[data-view='quotes'] .brand {
    min-width: 260px;
  }
}
@media (max-width: 1200px) {
  body[data-view='quotes'] .quote-list-table {
    min-width: 980px;
  }
  .quote-statistics-card .card-heading {
    flex-wrap: wrap;
  }
  .quote-list-statistics dt {
    gap: 8px;
  }
  .quote-list-statistics dd {
    font-size: 14px;
  }
}
@media (max-width: 600px) {
  body[data-view='quotes'] main > .toolbar {
    flex-wrap: wrap;
  }
  body[data-view='quotes'] main > .toolbar > strong {
    flex-basis: 100%;
  }
  body[data-view='quotes'] main > .toolbar > .spacer {
    display: none;
  }
}
.product-placeholder {
  width: 150px;
  min-height: 150px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border, #e6ebf5);
  border-radius: 6px;
  background: #f8faff;
  color: #526eb4;
}
.product-placeholder svg {
  width: 64px;
  height: 64px;
}
.margin-note.red {
  background: #fff0f0;
  color: #d72d30;
}
.margin-note.neutral {
  background: #f4f6fb;
  color: var(--muted);
}
.catalogue-description {
  white-space: pre-wrap;
  margin: 16px 0;
  color: var(--muted);
}
.catalogue-preview {
  display: flex;
  gap: 22px;
  align-items: flex-start;
}
.catalogue-preview > div:last-child {
  min-width: 0;
  flex: 1;
}
.catalogue-preview h2 {
  font-size: 24px;
}
.catalogue-preview strong {
  font-size: 22px;
}
.ecommerce-grid .toolbar {
  flex-wrap: wrap;
}
.ecommerce-grid .details dd {
  overflow-wrap: anywhere;
}
#quote-pdf-preview {
  min-height: 650px;
  background: #f2f4f8;
  padding: 0;
}
#quote-pdf-preview iframe {
  display: block;
  width: 100%;
  height: 760px;
  border: 0;
}
#quote-pdf-preview > p {
  padding: 20px;
}
.affair-summary-preview {
  min-height: 360px;
  background: #f2f4f8;
  border: 1px solid var(--border, #e6ebf5);
  border-radius: 8px;
  overflow: hidden;
}
.affair-summary-preview iframe {
  display: block;
  width: 100%;
  height: 420px;
  border: 0;
}
.affair-summary-preview > p {
  padding: 20px;
}
@media (max-width: 700px) {
  .affair-summary-preview {
    min-height: 280px;
  }
  .affair-summary-preview iframe {
    height: 320px;
  }
}
.phase-cycle-notice,
.phase-loss-reason {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 10px 10px;
  padding: 9px 12px;
  border-radius: 7px;
  background: #eef5ff;
  color: #244c9b;
}
.phase-cycle-notice > .icon {
  width: 20px;
}
.phase-cycle-notice span {
  display: grid;
}
.phase-cycle-notice small {
  color: var(--muted);
}
.phase-cycle-notice.overdue {
  background: #fff0f0;
  color: #c52b32;
}
.phase-loss-reason {
  align-items: flex-start;
  background: #fff4f4;
  color: var(--navy);
}
.phase-loss-reason span {
  overflow-wrap: anywhere;
}
.quote-emission-archives {
  margin: 0 16px 16px;
  padding: 12px;
  border: 1px solid #d9e4f0;
  border-radius: 8px;
  background: #f7fbff;
}
.quote-emission-archives h3 {
  margin: 0 0 8px;
}
.quote-emission-archives button {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 0;
  border-radius: 6px;
  background: #fff;
  color: var(--navy);
  text-align: left;
}
.quote-emission-archives button span {
  display: grid;
  min-width: 0;
  flex: 1;
}
.quote-emission-archives button strong,
.quote-emission-archives button small {
  overflow-wrap: anywhere;
}
.quote-archive-empty {
  display: grid;
  gap: 3px;
  margin: 0 16px 16px;
  padding: 12px;
  border-radius: 8px;
  background: #f5f6f8;
  color: var(--muted);
}
.pipeline-report-model-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
}
.pipeline-report-model-row span {
  display: grid;
  min-width: 0;
}
.pipeline-report-model-row small {
  overflow-wrap: anywhere;
}
.pipeline-report-preview {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}
.pipeline-report-preview > header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 14px;
  background: #f7f9fc;
}
.pipeline-report-preview > header h3,
.pipeline-report-preview > header p {
  margin: 0;
}
.pipeline-report-preview > header > div:last-child {
  display: grid;
  grid-template-columns: auto auto;
  gap: 2px 10px;
  text-align: right;
}
.pipeline-report-preview .table-scroll {
  max-height: 340px;
  overflow: auto;
}
@media (max-width: 600px) {
  .pipeline-report-model-row {
    grid-template-columns: 1fr auto;
  }
  .pipeline-report-model-row span {
    grid-column: 1/-1;
  }
  .pipeline-report-preview > header {
    display: grid;
  }
  .pipeline-report-preview > header > div:last-child {
    text-align: left;
  }
}
.quote-template-model-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) repeat(4, auto);
  align-items: center;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
}
.quote-template-model-row span {
  display: grid;
  min-width: 0;
}
.quote-template-model-row small {
  overflow-wrap: anywhere;
}
@media (max-width: 700px) {
  .quote-template-model-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .quote-template-model-row span {
    grid-column: 1/-1;
  }
  .quote-template-model-row .btn {
    justify-content: center;
  }
}
.brand strong {
  font-family: SoonplyUI, Arial, sans-serif;
  font-size: 23px;
}
.record-heading h1 {
  font-size: 29px;
}
.record-heading {
  margin-bottom: 10px;
}
.record-heading > small {
  flex: none;
  font-size: 12px;
}
.dossier nav > a {
  min-height: 48px;
  padding-block: 3px;
}
.dossier nav {
  gap: 4px;
}
.dossier nav > a b {
  font-size: 13px;
}
.dossier nav > a small {
  font-size: 12px;
}
.right-tabs {
  margin-bottom: 5px;
}
.right-panel .quick-actions {
  gap: 5px;
}
.right-panel .btn.quick {
  min-height: 36px;
  padding: 6px 10px;
  font-size: 13px;
}
.right-panel .details > div {
  min-height: 30px;
  padding: 5px 0;
}
.right-panel .details dd {
  font-size: 15px;
}
.ai-card p {
  font-size: 13px;
}
.full-width {
  grid-column: 1/-1;
}
.opportunity-exchanges > button {
  display: grid;
  grid-template-columns: 16px minmax(95px, 0.8fr) minmax(100px, 2fr) auto 55px;
  gap: 8px;
  width: 100%;
  align-items: center;
  text-align: left;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  padding: 5px 14px;
  font-size: 11px;
}
.opportunity-exchanges > button:hover {
  background: #f7f9ff;
}
.opportunity-exchanges strong {
  font-size: 11px;
  color: var(--navy);
  font-weight: 500;
}
.opportunity-exchanges > button > span {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.opportunity-exchanges time,
.opportunity-exchanges small {
  font-size: 10px;
  white-space: nowrap;
}
.opportunity-exchanges small {
  overflow: hidden;
  text-overflow: ellipsis;
}
.opportunity-exchanges .icon {
  width: 14px;
  height: 14px;
  color: var(--purple);
}
body[data-view='opportunity'] .opportunity-exchanges.full > button {
  grid-template-columns: 18px minmax(130px, 1fr) minmax(150px, 2fr) auto 110px;
  padding: 10px 14px;
  font-size: 13px;
  line-height: 18px;
}
.opportunity-exchanges.full strong {
  font-size: 13px;
}
.opportunity-exchanges.full time,
.opportunity-exchanges.full small {
  font-size: 12px;
}
@media (max-width: 1200px) {
  body[data-view='opportunity'] .opportunity-exchanges.full > button {
    grid-template-columns: 18px minmax(110px, 1fr) auto;
  }
  .opportunity-exchanges.full > button > span {
    grid-column: 2 / 4;
    grid-row: 2;
  }
  .opportunity-exchanges.full > button > small {
    grid-column: 2 / 4;
    grid-row: 3;
  }
}
.stage-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: currentColor;
}
.next-date {
  display: flex;
  gap: 7px;
  align-items: center;
  color: var(--muted);
  white-space: nowrap;
}
.next-date .icon {
  width: 16px;
  height: 16px;
  color: var(--orange);
}
body[data-view='opportunity'] .person-row .contact-name {
  color: var(--navy);
  margin: 0;
}
body[data-view='opportunity'] .person-row > .person-actions {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}
body[data-view='opportunity'] .person-actions .badge {
  font-size: 10px;
  padding: 3px 7px;
}
body[data-view='opportunity'] .person-actions .btn {
  padding: 2px;
  min-width: 24px;
  min-height: 24px;
  border: 0;
}
body[data-view='opportunity'] .person-row > div > small {
  display: block;
  font-size: 12px;
  margin-top: 4px;
}
.people-picker {
  border: 1px solid var(--line);
  border-radius: 7px;
  margin: 0;
  padding: 10px 12px;
  max-height: 340px;
  overflow: auto;
}
.people-picker legend {
  font-size: 13px;
  padding: 0 5px;
  color: var(--navy);
}
.people-picker > div {
  display: flex;
  gap: 14px;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--line);
  padding: 10px 0;
}
.people-picker > div[hidden] {
  display: none;
}
.dialog-body .people-picker label {
  flex-direction: row;
  align-items: center;
  font-size: 13px;
  cursor: pointer;
}
.people-picker > div > label:first-child {
  flex: 1;
  min-width: 0;
}
.people-picker input {
  flex: none;
}
.people-picker small {
  display: block;
  font-size: 12px;
  color: var(--muted);
}
.people-picker .primary-none {
  padding: 4px 0 10px;
}
.company-heading-actions {
  display: flex;
  gap: 4px;
}
body[data-view='contact'] .contact-hero {
  gap: 16px;
  padding: 8px 0 10px 10px;
  margin-bottom: 0;
}
body[data-view='contact'] .contact-hero > .photo {
  width: 105px;
  height: 105px;
}
body[data-view='contact'] .contact-hero > .avatar {
  width: 110px;
  height: 110px;
  flex: none;
  border-radius: 50%;
  font-size: 32px;
}
body[data-view='contact'] .relation-box {
  display: flex;
  gap: 16px;
  text-align: left;
  align-items: flex-start;
  background: #fff;
  width: 220px;
  min-width: 220px;
  padding: 12px 14px;
}
body[data-view='contact'] .relation-box > .icon {
  width: 30px;
  height: 30px;
  flex: none;
  margin-top: 9px;
}
body[data-view='contact'] .relation-box small {
  display: block;
  color: var(--muted);
  font-size: 13px;
}
body[data-view='contact'] .relation-box strong {
  color: var(--navy);
  font-size: 24px;
}
body[data-view='contact'] .relation-box.muted strong {
  font-size: 18px;
}
body[data-view='contact'] .dots > i {
  background: #d8dce7;
}
body[data-view='contact'] .dots > i.filled {
  background: currentColor;
}
body[data-view='contact'] .relation-box.yellow {
  color: #eaa300;
}
body[data-view='contact'] main > .tabs {
  margin-top: 7px;
  margin-bottom: 16px;
}
body[data-view='contact'] .contact-grid .details > div {
  min-height: 30px;
  padding: 4px 0;
}
body[data-view='contact'] .contact-grid .details dd {
  min-width: 0;
}
body[data-view='contact'] .contact-grid .details dd > .avatar {
  width: 24px;
  height: 24px;
}
.contact-coordinate {
  display: flex;
  align-items: center;
  gap: 6px;
  justify-content: space-between;
}
.contact-coordinate > a {
  overflow-wrap: anywhere;
  min-width: 0;
}
.contact-coordinate > .btn {
  border: 0;
  padding: 0;
  min-width: 20px;
  min-height: 24px;
  color: var(--blue);
  flex: none;
}
.contact-coordinate .icon {
  width: 15px;
  height: 15px;
}
.contact-detail-tags {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}
.contact-detail-tags > .tag-chip {
  margin: 0;
  white-space: nowrap;
}
.contact-detail-tags > .tag-chip.purple {
  background: #eee7ff;
  color: var(--purple);
}
.contact-detail-tags > .btn {
  padding: 3px;
  min-height: 26px;
}
.contact-detail-tags > .btn .icon {
  width: 16px;
  height: 16px;
}
.contact-exchange {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: white;
  text-align: left;
  color: var(--navy);
}
.contact-exchange > span {
  flex: 1;
  min-width: 0;
}
.contact-exchange strong,
.contact-upcoming strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
}
.contact-exchange > span > span,
.contact-upcoming > button > span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
  margin-top: 3px;
}
.contact-upcoming > button > span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.contact-exchange > time {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  flex: none;
}
.activity-overdue {
  display: inline-block;
  margin-left: 6px;
  color: #e44732;
  font-size: 11px;
  white-space: nowrap;
}
.recommendation-targets > a {
  justify-content: space-between;
  text-align: left;
  white-space: normal;
}
.recommendation-targets small {
  display: block;
  color: var(--muted);
  margin-top: 4px;
}
.pipeline-opportunity-picker {
  margin-top: 14px;
  max-height: 50vh;
  overflow-y: auto;
}
.pipeline-opportunity-picker > .btn {
  flex-shrink: 0;
  height: auto;
  justify-content: space-between;
  text-align: left;
  white-space: normal;
  gap: 16px;
  padding: 12px;
}
.pipeline-opportunity-picker > .btn[hidden] {
  display: none;
}
.pipeline-opportunity-picker small {
  display: block;
  color: var(--muted);
  margin-top: 4px;
}
.pipeline-opportunity-picker > .btn > strong {
  flex-shrink: 0;
}
.conversion-summary p {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.email-draft-row {
  width: 100%;
  text-align: left;
  gap: 12px;
}
.email-draft-row > span {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}
.email-draft-row strong,
.email-draft-row small {
  display: block;
}
.email-draft-row small {
  color: var(--muted);
  margin-top: 4px;
}
.email-draft-row > .icon {
  color: var(--purple);
}
.email-draft-row time {
  white-space: nowrap;
  color: var(--muted);
  font-size: 12px;
}
.search-results .search-result {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  width: 100%;
  padding: 11px;
  text-align: left;
  white-space: normal;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: white;
}
.search-result > .icon {
  flex: none;
  color: var(--orange);
}
.search-result > span {
  min-width: 0;
  overflow-wrap: anywhere;
}
.search-result strong {
  font-size: 14px;
  font-weight: 600;
}
.search-result small {
  color: var(--muted);
  font-size: 12px;
  margin-top: 4px;
}
.search-result-count {
  font-size: 12px;
  color: var(--muted);
}
.dialog-body label.search-field:has([data-global-search]) {
  flex-direction: row;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
}
.dialog-body label.search-field > [data-global-search] {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  box-shadow: none;
  background: transparent;
  padding: 11px 0;
}
.dialog-body label.search-field:has([data-global-search]:focus) {
  border-color: var(--blue);
  box-shadow: 0 0 0 2px #486fff25;
}
.contact-exchange[data-kind='Appel'] > .icon {
  color: var(--green);
}
.contact-exchange[data-kind='Réunion'] > .icon,
.contact-exchange[data-kind='Note'] > .icon {
  color: var(--orange);
}
body[data-view='contact'] .linked-record[data-category='Industriel'] > .icon:first-child,
body[data-view='contact'] .linked-record[data-category='Tertiaire'] > .icon:first-child,
body[data-view='contact'] .linked-record[data-category='Public'] > .icon:first-child {
  color: #2461ff;
}
.contact-upcoming {
  gap: 8px;
}
.contact-upcoming > button:not(.btn) {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--navy);
  text-align: left;
  min-width: 0;
  flex: 1;
}
.contact-upcoming .activity-when {
  font-size: 12px;
  text-align: right;
  white-space: nowrap;
  flex: none;
  color: var(--muted);
}
.contact-upcoming .activity-when.red {
  color: #e44732;
}
.contact-upcoming .activity-when > small {
  display: block;
  font-size: 11px;
}
.contact-upcoming > .btn {
  min-width: 18px;
  min-height: 24px;
  border: 0;
  padding: 0;
  flex: none;
}
body[data-view='contact'] .linked-record {
  min-width: 0;
  gap: 8px;
}
body[data-view='contact'] .linked-record > div {
  min-width: 0;
}
body[data-view='contact'] .linked-record p {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
body[data-view='contact'] .contact-bottom .card-heading {
  gap: 8px;
  padding: 10px 12px;
}
body[data-view='contact'] .contact-bottom .card-heading h2 {
  font-size: 12px;
  min-width: 0;
}
body[data-view='contact'] .contact-bottom .card-heading .btn {
  font-size: 11px;
  padding: 5px 7px;
  flex: none;
}
body[data-view='contact'] .contact-bottom .activity-row {
  padding: 12px;
}
body[data-view='contact'] .contact-bottom .commercial-action-details.default-priority {
  display: none !important;
}
/* The reference places five exchanges and the recent note in the first desktop screen. */
@media (min-width: 1201px) {
  body[data-view='contact'] .contact-grid .details {
    padding-bottom: 5px;
  }
  body[data-view='contact'] .contact-bottom .card-heading {
    min-height: 40px;
    padding: 7px 12px;
  }
  body[data-view='contact'] .contact-bottom .linked-record {
    padding: 6px 8px;
    margin-bottom: 5px;
  }
  body[data-view='contact'] .contact-bottom .linked-record h3 {
    line-height: 1.2;
  }
  body[data-view='contact'] .contact-bottom .linked-record p {
    font-size: 12px;
    line-height: 1.25;
  }
  body[data-view='contact'] .contact-bottom .contact-exchange {
    display: grid;
    grid-template-columns: 20px minmax(0, 1fr) auto;
    column-gap: 12px;
    row-gap: 3px;
    padding: 9px 14px;
  }
  body[data-view='contact'] .contact-exchange > .icon {
    grid-column: 1;
    grid-row: 1 / 3;
    align-self: center;
  }
  body[data-view='contact'] .contact-exchange > span {
    display: contents;
  }
  body[data-view='contact'] .contact-exchange strong {
    grid-column: 2;
    grid-row: 1;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  body[data-view='contact'] .contact-exchange > time {
    grid-column: 3;
    grid-row: 1;
  }
  body[data-view='contact'] .contact-exchange > span > span {
    grid-column: 2 / 4;
    grid-row: 2;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}
body[data-view='contact'] .right-panel .btn.quick {
  min-height: 41px;
  font-size: 14px;
}
body[data-view='contact'] .right-panel .details > div {
  min-height: 39px;
}
body[data-view='contact'] .contact-statistics dt {
  display: flex;
  align-items: center;
  gap: 14px;
}
.contact-statistics dt > .icon {
  width: 20px;
  height: 20px;
  flex: none;
  color: var(--blue);
}
body[data-view='contact'] .ai-card p {
  font-size: 14px;
}
@media (min-width: 1550px) {
  body[data-view='contact'] {
    --right: 338px;
  }
  body[data-view='contact'] main {
    padding-left: 22px;
    padding-right: 24px;
  }
  body[data-view='contact'] .right-panel {
    padding-left: 9px;
  }
  body[data-view='contact'] .contact-hero h1 {
    font-size: 34px;
  }
  body[data-view='contact'] .contact-grid {
    grid-template-columns: 1fr 1fr 1.05fr;
  }
  body[data-view='contact'] .contact-bottom {
    grid-template-columns: 0.975fr 1fr 1.025fr;
  }
  body[data-view='contact'] .contact-bottom .grid.two {
    grid-template-columns: 1.04fr 1fr;
  }
}
@media (max-width: 1200px) {
  body[data-view='contact'] .relation-box {
    display: none;
  }
  .contact-upcoming {
    flex-wrap: wrap;
  }
}
@media (max-width: 600px) {
  body[data-view='contact'] .contact-grid,
  body[data-view='contact'] .contact-bottom,
  body[data-view='contact'] .contact-bottom .grid.two {
    grid-template-columns: minmax(0, 1fr);
  }
  body[data-view='contact'] .contact-grid > .card,
  body[data-view='contact'] .contact-bottom > *,
  body[data-view='contact'] .contact-bottom .wide-two {
    grid-column: auto;
    min-width: 0;
  }
}
.company-heading-actions > .btn:last-child {
  padding-inline: 3px;
}
.company-grid .details a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  overflow-wrap: anywhere;
}
.company-grid .details a .icon,
.contact-grid .details a .icon {
  width: 14px;
  height: 14px;
  flex: none;
}
body[data-view='company'] .card-body {
  white-space: pre-line;
}
.company-hierarchy {
  display: grid;
  gap: 7px;
}
.company-hierarchy a {
  padding: 5px 8px;
  border-left: 2px solid var(--line);
  color: var(--blue);
}
.company-hierarchy a[aria-current='page'] {
  border-color: var(--orange);
  background: #fff5ef;
}
.company-logo {
  overflow: hidden;
}
.company-logo img,
.company-logo-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.company-logo-preview {
  height: 130px;
  margin: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 7px;
  overflow: hidden;
}
.company-logo-preview > .icon {
  width: 54px;
  height: 54px;
  color: var(--blue);
}
.company-addresses {
  display: grid;
  gap: 8px;
}
.company-addresses article {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
}
.company-addresses article > div {
  flex: 1;
  min-width: 0;
}
.company-addresses small,
.company-addresses p {
  display: block;
  color: var(--muted);
  margin-top: 3px;
}
.company-addresses .btn {
  flex: none;
}
@media (max-width: 600px) {
  body[data-view='company'] .company-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  body[data-view='company'] .company-grid > * {
    grid-column: auto;
    min-width: 0;
  }
  .company-addresses article {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .company-addresses article > div {
    flex-basis: 100%;
  }
}
.company-contracts-wide {
  grid-column: 1/-1;
  min-width: 0;
}
.framework-contracts {
  display: grid;
  gap: 10px;
  white-space: normal !important;
}
.framework-contract {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 10px;
}
.framework-contract > header,
.framework-contract > article {
  display: flex;
  align-items: center;
  gap: 10px;
}
.framework-contract > header {
  margin-bottom: 7px;
}
.framework-contract > header > strong,
.framework-contract > article > div {
  flex: 1;
  min-width: 0;
}
.framework-contract > article {
  border-top: 1px solid var(--line);
  padding: 9px 0;
}
.framework-contract > article:last-child {
  padding-bottom: 0;
}
.framework-contract small {
  display: block;
  color: var(--muted);
  margin-top: 3px;
}
.framework-contract .btn,
.framework-contract .badge {
  flex: none;
}
@media (max-width: 600px) {
  .framework-contract > article {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .framework-contract > article > div {
    flex-basis: 100%;
  }
}
body[data-view='opportunity'] .stat-icon.green {
  color: var(--green);
}
.quote-status-mark.green,
.quote-status-value.green {
  color: #00aa75;
}
.quote-status-mark.red,
.quote-status-value.red {
  color: #ff2929;
}
.quote-status-mark.blue,
.quote-status-value.blue {
  color: #1760ff;
}
.quote-status-mark.purple,
.quote-status-value.purple {
  color: var(--cx-ink-accent);
}
.quote-status-mark.yellow,
.quote-status-value.yellow {
  color: #a35e00;
}
.quote-status-mark.grey,
.quote-status-value.grey {
  color: #727f99;
}
body[data-view='opportunity'] .hero-photo > .photo {
  width: 100%;
  height: 100%;
}
body[data-view='opportunity'] .hero-description {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.document-actions {
  display: flex;
  gap: 5px;
  align-items: center;
}
.document-actions .btn.small {
  font-size: 12px;
  padding-inline: 7px;
}
.attachment-image {
  display: block;
  max-width: 100%;
  max-height: 430px;
  object-fit: contain;
  margin: 14px auto;
}
.attachment-pdf {
  width: 100%;
  height: 430px;
  border: 1px solid var(--line);
  margin: 12px 0;
}
.document-preview {
  overflow-wrap: anywhere;
  max-height: 430px;
  overflow: auto;
}
.calendar-filters {
  display: grid;
  grid-template-columns: 1.05fr 1fr 1fr 1.25fr 1.65fr;
  gap: 8px;
}
.calendar-filters > select,
.calendar-filters > .calendar-period {
  min-width: 0;
  max-width: none;
  width: 100%;
  font-size: 13px;
  padding: 9px 7px;
}
.calendar-filters .search-field {
  min-width: 0;
}
.calendar-filters input[type='search'] {
  min-width: 0;
}
.mini-calendar > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.mini-calendar > header h3 {
  margin: 0;
}
.mini-calendar > header > div {
  display: flex;
  gap: 2px;
}
.mini-calendar > header .btn {
  min-width: 29px;
  min-height: 29px;
  padding: 2px 7px;
  border: 1px solid var(--line);
}
.mini-calendar .outside {
  color: #9ba8c0;
}
.mini-calendar .today {
  box-shadow: inset 0 0 0 1px var(--orange);
}
.calendar-cells > button.selected:not(.today) time {
  color: var(--orange);
  font-weight: 700;
}
.calendar-backlog > p {
  margin-bottom: 8px;
}
.calendar-backlog article > div {
  gap: 8px;
}
.calendar-grip {
  flex: none;
  width: 10px;
  align-self: center;
  margin-left: -4px;
  color: #8e9bb6;
}
.calendar-backlog article .photo {
  width: 74px !important;
  height: 85px !important;
}
.project-photo-empty {
  display: grid;
  place-items: center;
  background: #f1f5fb;
  color: #6b7fb5;
}
.project-photo-empty .icon {
  width: 30px;
  height: 30px;
}
.calendar-legend i.teal {
  background: #98e9e9;
}
.calendar-legend i.yellow {
  background: #ffc43d;
}
.calendar-legend i.gray {
  background: #a8aebb;
}
.calendar-legend i.diamond {
  background: #627599;
  border-radius: 0;
  transform: rotate(45deg);
  width: 10px;
  height: 10px;
}
.year-calendar > button {
  padding: 13px;
}
.year-calendar .year-month-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
  margin: 12px 0;
}
.year-month-days small {
  text-align: center;
  font-size: 12px;
  line-height: 24px;
  border-radius: 4px;
}
.year-month-days .outside {
  color: #b4bfd1;
}
.year-month-days .booked {
  background: #dff8ee;
  color: #008a67;
  font-weight: 600;
}
@media (min-width: 1201px) {
  body[data-view='calendar'] {
    --dossier: 170px;
    --right: 295px;
  }
  body[data-view='calendar'] main {
    padding: 22px;
  }
  .calendar-backlog > article {
    margin: 12px 0;
    padding: 12px;
  }
  .calendar-backlog article .photo {
    width: 84px;
    height: 90px;
  }
}
body[data-view='calendar'] main > .page-heading {
  margin-bottom: 8px;
}
body[data-view='calendar'] main > .page-heading h1 {
  font-size: 36px;
}
body[data-view='calendar'] main > .tabs {
  width: max-content;
  max-width: 100%;
  min-height: 39px;
  margin-top: 8px;
}
body[data-view='calendar'] main > .tabs > button {
  padding: 8px 17px;
  flex: none;
}
@media (max-width: 1200px) {
  .calendar-filters {
    grid-template-columns: 1fr 1fr;
  }
  .calendar-filters .search-field {
    grid-column: 1/-1;
  }
}
.dialog-body form > p {
  grid-column: 1/-1;
}
#planning-preview {
  overflow: auto;
  margin-top: 12px;
}
body[data-view='quote'] .quote-lines {
  table-layout: fixed;
  min-width: 980px;
}
body[data-view='quote'] .quote-lines th:first-child {
  width: 4.5%;
}
body[data-view='quote'] .quote-lines th:nth-child(2) {
  width: 5.5%;
}
body[data-view='quote'] .quote-lines th:nth-child(3) {
  width: 23.7%;
  text-align: left;
  padding-left: 26px;
}
body[data-view='quote'] .quote-lines th:nth-child(4),
body[data-view='quote'] .quote-lines th:nth-child(5) {
  width: 7.3%;
}
body[data-view='quote'] .quote-lines th:nth-child(6) {
  width: 12.5%;
}
body[data-view='quote'] .quote-lines th:nth-child(7) {
  width: 11.4%;
}
body[data-view='quote'] .quote-lines th:nth-child(8) {
  width: 10.1%;
}
body[data-view='quote'] .quote-lines th:nth-child(9) {
  width: 8.7%;
}
body[data-view='quote'] .quote-lines th:last-child {
  width: 9%;
}
body[data-view='quote'] .quote-lines td:nth-child(3) {
  padding-left: 12px;
  overflow-wrap: anywhere;
}
body[data-view='quote'] .quote-lines td:last-child .btn {
  width: 26px;
  min-width: 26px;
}
body[data-view='quote'] .quote-lines td:last-child .icon {
  width: 20px;
  height: 20px;
  stroke-width: 2.5;
  flex: none;
}
body[data-view='quote'] .quote-lines tr:not(.group-row) td:nth-child(5),
body[data-view='quote'] .quote-lines tr:not(.group-row) td:nth-child(8),
body[data-view='quote'] .quote-lines tr:not(.group-row) td:nth-child(9),
body[data-view='quote'] .quote-lines td:last-child {
  text-align: center;
}
body[data-view='quote'] .quote-lines .group-row td:nth-last-child(2),
body[data-view='quote'] .quote-lines .group-row td:nth-last-child(3) {
  text-align: center;
  font-weight: 400;
}
body[data-view='quote'] .quote-totals > .stat:last-child {
  display: flex;
}
body[data-view='quote'] .quote-totals > .stat:nth-child(2) .stat-icon {
  color: var(--green);
}
body[data-view='quote'] .quote-totals > .stat:nth-child(3) .stat-icon {
  color: #287aff;
}
body[data-view='quote'] .quote-totals > .stat:nth-child(4) .stat-icon {
  color: var(--purple);
}
@media (min-width: 901px) and (max-width: 1549px) {
  body[data-view='quote'] .quote-totals {
    grid-template-columns: 1.8fr 1fr;
  }
  body[data-view='quote'] .quote-total-main {
    grid-column: auto;
  }
  body[data-view='quote'] .summary-stats {
    grid-auto-flow: row;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  body[data-view='quote'] .summary-stats .stat {
    min-width: 0;
    min-height: 82px;
    height: auto;
  }
  body[data-view='quote'] .summary-stats .stat strong {
    white-space: normal;
    overflow-wrap: anywhere;
  }
  body[data-view='quote'] main > .toolbar {
    flex-wrap: wrap;
  }
}
@media (min-width: 1550px) {
  body[data-view='quote'] {
    --dossier: 165px;
  }
  body[data-view='quote'] .record-heading {
    margin-bottom: 8px;
  }
  body[data-view='quote'] .summary-stats {
    margin-bottom: 12px;
  }
  body[data-view='quote'] .summary-stats .stat {
    height: 82px;
    gap: 8px;
    padding-inline: 10px;
  }
  body[data-view='quote'] .summary-stats .stat strong {
    font-size: var(--record-field-value-size);
  }
  body[data-view='quote'] .summary-stats .stat:first-child strong {
    font-size: var(--record-field-value-size);
  }
  body[data-view='quote'] .summary-stats .stat-icon > .icon {
    width: 25px;
    height: 25px;
  }
  body[data-view='quote'] .tabs {
    min-height: 39px;
    margin-top: 10px;
  }
  body[data-view='quote'] .tabs > button {
    padding: 9px 10px;
    font-size: 13px;
  }
  .quote-lines td {
    height: 25px;
    padding: 1px 9px;
    font-size: 14px;
    line-height: 17px;
  }
  .quote-lines td .btn {
    min-height: 18px;
    height: 18px;
    padding: 0;
    vertical-align: middle;
  }
  .quote-lines td input[type='checkbox'] {
    display: block;
    margin: 0;
  }
  .quote-lines .group-row td {
    height: 26px;
    padding: 1px 9px;
  }
  .quote-lines th {
    height: 33px;
    padding: 5px 9px;
    font-size: 12px;
  }
  .quote-lines td:nth-child(3) {
    min-width: 195px;
  }
  .quote-totals {
    margin-top: 10px;
  }
  .quote-totals .stat,
  .quote-total-main {
    padding: 6px 8px;
  }
  .quote-total-main {
    gap: 10px;
  }
  .quote-totals .stat strong {
    font-size: 15px;
  }
  body[data-view='quote'] {
    --right: 325px;
  }
  body[data-view='quote'] .layout.with-dossier main {
    padding-right: 26px;
  }
  body[data-view='quote'] .record-heading {
    margin-bottom: 3px;
  }
  body[data-view='quote'] .quote-customer-summary {
    grid-auto-flow: row;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    margin-bottom: 12px;
  }
  body[data-view='quote'] .quote-customer-summary .stat {
    height: 82px;
    min-height: 82px;
    padding: 8px 9px;
    gap: 7px;
  }
  body[data-view='quote'] .quote-customer-summary .stat strong {
    font-size: var(--record-field-value-size);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  body[data-view='quote'] .quote-customer-summary .stat:first-child strong {
    font-size: var(--record-field-value-size);
  }
  body[data-view='quote'] main > .toolbar {
    flex-wrap: nowrap;
    margin-top: 14px;
  }
  body[data-view='quote'] main > .toolbar .btn {
    padding-inline: 7px;
    font-size: 12px;
    gap: 6px;
  }
  body[data-view='quote'] main > .toolbar .btn > .icon {
    width: 16px;
    height: 16px;
  }
  body[data-view='opportunity'] {
    --dossier: 160px;
    --right: 359px;
  }
  body[data-view='opportunity'] .layout.with-dossier main {
    padding-right: 0;
  }
  body[data-view='opportunity'] .right-panel {
    padding-left: 28px;
    padding-right: 28px;
  }
  body[data-view='opportunity'] .record-heading h1 {
    font-size: 33px;
    letter-spacing: 0.1px;
  }
  body[data-view='opportunity'] .record-heading {
    margin-bottom: 2px;
  }
  body[data-view='opportunity'] .hero-card {
    grid-template-columns: 225px minmax(220px, 1fr) minmax(380px, 1.8fr);
    gap: 18px;
    height: 164px;
  }
  body[data-view='opportunity'] .hero-photo {
    height: 144px;
  }
  body[data-view='opportunity'] .hero-metrics .stat strong {
    font-size: 18px;
  }
  body[data-view='opportunity'] .hero-metrics .stat:last-child strong {
    font-size: 14px;
    display: flex;
    align-items: center;
    white-space: nowrap;
    gap: 3px;
  }
  body[data-view='opportunity'] .hero-metrics .stat-icon {
    margin-top: 2px;
  }
  body[data-view='opportunity'] .hero-metrics .stat {
    gap: 10px;
    padding: 6px 10px;
  }
  body[data-view='opportunity'] .hero-description {
    font-size: 12px;
  }
  body[data-view='opportunity'] .need-text {
    line-height: 1.5;
    font-size: 13px;
    white-space: pre-line;
  }
  body[data-view='opportunity'] .grid.three {
    grid-template-columns: 1.2fr 1fr 0.9fr;
  }
  body[data-view='opportunity'] .person-row {
    padding: 7px 10px;
    gap: 9px;
  }
  body[data-view='opportunity'] .person-row a {
    font-size: 13px;
  }
  body[data-view='opportunity'] .person-row > .badge {
    padding: 4px 7px;
    font-size: 10px;
  }
  body[data-view='opportunity'] .event-detail > .description {
    margin: 10px 0;
    font-size: 13px;
  }
  body[data-view='opportunity'] .event-detail > p {
    margin-top: 5px;
  }
  body[data-view='opportunity'] .event-detail > .toolbar {
    margin: 4px 0;
  }
  body[data-view='opportunity'] .event-detail {
    padding-bottom: 8px;
  }
  body[data-view='opportunity'] .tags {
    padding-bottom: 8px;
  }
  body[data-view='opportunity'] .tag-chip {
    font-size: 12px;
    padding: 4px 12px;
    line-height: 1.3;
  }
  body[data-view='opportunity'] .stage-track {
    padding: 6px 20px 8px;
  }
  body[data-view='opportunity'] .next-step {
    padding: 7px 10px;
    margin-bottom: 8px;
  }
  body[data-view='opportunity'] .section-space .details > div {
    min-height: 25px;
    padding: 3px 0;
    font-size: 13px;
  }
  body[data-view='opportunity'] main > .grid .card-heading {
    min-height: 40px;
    padding: 6px 12px;
  }
  body[data-view='opportunity'] main > .grid .card-heading .btn.small {
    min-height: 28px;
    padding-block: 4px;
  }
  body[data-view='opportunity'] main > .grid.section-space {
    margin-top: 10px;
  }
  body[data-view='opportunity'] main > .grid .details {
    padding-bottom: 0;
  }
  body[data-view='opportunity'] .opportunity-recent {
    grid-template-columns: 1.7fr 1fr;
  }
  body[data-view='opportunity'] .opportunity-finance-grid {
    grid-template-columns: minmax(260px, 0.7fr) minmax(0, 1.5fr);
  }
  body[data-view='opportunity'] .opportunity-recent .document-list > button {
    padding: 1px 12px;
    gap: 8px;
    font-size: 11px;
    min-height: 20px;
  }
  body[data-view='opportunity'] .opportunity-exchanges > button {
    padding-block: 3px;
    min-height: 22px;
    line-height: 16px;
  }
  body[data-view='opportunity'] .opportunity-recent .document-list > button > span > small {
    display: none;
  }
  body[data-view='opportunity'] .opportunity-recent .document-list > button > small {
    font-size: 10px;
    white-space: nowrap;
  }
  body[data-view='opportunity'] .opportunity-recent .document-list > button > .icon {
    width: 13px;
    height: 13px;
  }
  body[data-view='opportunity'] .event-detail > .toolbar {
    justify-content: flex-end;
  }
  body[data-view='opportunity'] .tag-chip:nth-child(4n + 3) {
    background: #dff8ef;
    color: #00866f;
  }
  body[data-view='opportunity'] main > .grid > .card > .card-heading h2 > .icon {
    background: #fff3eb;
    border-radius: 7px;
    padding: 4px;
    box-sizing: content-box;
  }
  body[data-view='article'] main {
    padding-inline: 24px;
  }
  body[data-view='article'] .article-heading {
    margin: 10px 0 12px;
  }
  .article-heading .page-heading h1 {
    font-size: 28px;
  }
  .article-specs {
    line-height: 1.43;
    margin-top: 6px;
  }
  .article-grid .details {
    margin: 7px 0;
  }
  .article-grid .details > div {
    padding: 3px 0;
    min-height: 27px;
  }
  .stock-total {
    margin-bottom: 8px;
  }
  .supplier-row {
    padding: 7px 13px;
    gap: 10px;
  }
  .supplier-row h3 {
    font-size: 13px;
  }
  .supplier-row p {
    font-size: 12px;
  }
  .article-grid .card-body {
    font-size: 13px;
    padding-bottom: 11px;
  }
  .manufacturing-summary .card-heading h2 {
    font-size: 14px;
  }
  .operation-row {
    margin: 5px 0;
    padding: 8px;
  }
  body[data-view='project'] {
    --right: 340px;
  }
  body[data-view='project'] .layout.with-dossier main {
    padding-top: 16px;
  }
  body[data-view='project'] .record-heading h1 {
    font-size: 32px;
  }
  body[data-view='project'] .project-hero {
    grid-template-columns: 225px minmax(220px, 1fr) minmax(400px, 1.65fr);
    gap: 16px;
    min-height: 181px;
  }
  body[data-view='project'] .project-hero .hero-photo {
    height: 160px;
  }
  body[data-view='project'] .project-hero .hero-info {
    gap: 8px;
  }
  body[data-view='project'] .project-hero .hero-metrics .stat {
    gap: 12px;
  }
  body[data-view='project'] .tabs {
    margin-top: 18px;
    margin-bottom: 16px;
  }
}

.quote-lines td .quote-group-toggle {
  border: 0;
  background: transparent;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-weight: 600;
  min-width: 32px;
  justify-content: flex-start;
  color: var(--navy);
  white-space: nowrap;
}
.quote-lines .quote-group-toggle .icon {
  width: 13px;
  height: 13px;
}
.quote-lines td .quote-group-toggle:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 2px;
}
.quote-lines .quote-inline-field {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 3px;
  min-width: 0;
}
.quote-lines .quote-inline-input {
  width: 100%;
  min-width: 54px;
  max-width: 92px;
  border: 1px solid transparent;
  border-radius: 4px;
  background: transparent;
  color: var(--blue);
  font: inherit;
  text-align: right;
  padding: 2px 4px;
}
.quote-lines .quote-inline-input:hover,
.quote-lines .quote-inline-input:focus {
  border-color: #92b4f4;
  background: #fff;
  outline: none;
  box-shadow: 0 0 0 2px #5f93ec22;
}
.quote-lines .quote-inline-input:disabled {
  color: inherit;
  cursor: default;
}
.quote-lines .quote-note-row td,
.quote-lines .quote-section-row td {
  padding: 7px 10px;
}
.quote-lines .quote-structural-content {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  justify-content: flex-start;
  text-align: left;
}
.quote-lines
  .quote-structural-content
  > span:not(.quote-line-grip):not(.quote-pdf-hidden):not(.quote-section-number) {
  flex: 1;
}
.quote-lines .quote-structural-content > .btn {
  margin-left: auto;
}
.quote-lines .quote-section-number {
  flex: none;
  color: var(--orange);
  font-weight: 750;
}
.quote-lines .quote-section-margin,
.quote-lines .quote-group-margin {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #405579;
  font-size: 12px;
  white-space: nowrap;
}
.quote-lines .quote-section-margin {
  margin-left: auto;
}
.quote-lines .quote-section-margin input,
.quote-lines .quote-group-margin input {
  width: 56px;
  border: 1px solid #c9d7ee;
  border-radius: 4px;
  background: #fff;
  color: var(--blue);
  font: inherit;
  padding: 2px 4px;
  text-align: right;
}
.quote-lines .quote-section-margin + .btn {
  margin-left: 0;
}
.quote-lines .quote-note-content {
  text-align: left;
}
.quote-lines .quote-article-link {
  color: var(--navy);
  font-weight: 650;
  text-decoration: none;
}
.quote-lines .quote-article-link:hover,
.quote-lines .quote-article-link:focus-visible {
  text-decoration: underline;
  color: var(--blue);
}
.quote-lines .quote-line-description-row td {
  padding: 1px 10px 8px;
  border-top: 0;
  text-align: left;
}
.quote-lines .quote-line-description {
  display: block;
  color: #64749a;
  font-size: 12px;
  line-height: 1.45;
  text-align: left;
}
.quote-lines .quote-assembly-component-row {
  background: #fbfcff;
  color: #53698f;
}
.quote-lines .quote-assembly-component-row td {
  padding-top: 5px;
  padding-bottom: 5px;
  border-top: 0;
}
.quote-lines .quote-component-designation {
  padding-left: 18px !important;
}
.quote-lines .quote-component-included {
  color: #64749a;
  font-size: 12px;
  font-style: italic;
  white-space: nowrap;
}
.quote-note-editor {
  display: grid;
  gap: 8px;
}
.quote-note-formatting {
  display: flex;
  gap: 6px;
}
.quote-note-editor small {
  color: #64749a;
}
.quote-global-discount {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 6px;
  color: #405579;
  font-size: 12px;
}
.quote-global-discount input {
  width: 56px;
  border: 1px solid #c9d7ee;
  border-radius: 4px;
  background: #fff;
  color: var(--blue);
  font: inherit;
  padding: 2px 4px;
  text-align: right;
}
.quote-total-main > small {
  display: block;
  color: #64749a;
  font-size: 11px;
  margin-top: 4px;
}
.quote-selection {
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f5f8ff;
  flex-wrap: wrap;
}
.quote-selection strong {
  margin-right: auto;
}

.record-metadata {
  margin-right: 16px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  white-space: normal;
  max-width: 290px;
  flex-shrink: 0;
}
.record-heading > .page-heading {
  min-width: 0;
  flex: 1;
}
.record-heading .page-heading h1 {
  overflow-wrap: anywhere;
}

/* Kanban des opportunités, capture de référence 1448 × 1086. */
body[data-view='opportunities'] main {
  padding: 13px 4px 18px 18px;
}
body[data-view='opportunities'] .collection-head {
  padding: 8px 32px 0 10px;
}
body[data-view='opportunities'] .page-heading p {
  margin-top: 0;
}
body[data-view='opportunities'] .page-heading > .btn {
  align-self: flex-start;
  margin-top: 3px;
  min-height: 39px;
  padding: 9px 17px;
}
body[data-view='opportunities'] .collection-head .tabs {
  min-height: 40px;
  height: 40px;
  margin-top: 12px;
}
body[data-view='opportunities'] .collection-head .tabs > button {
  padding: 8px 18px;
  min-width: 0;
}
body[data-view='opportunities'] .collection-head .tabs > button:nth-child(1) {
  width: 120px;
}
body[data-view='opportunities'] .collection-head .tabs > button:nth-child(2) {
  width: 105px;
}
body[data-view='opportunities'] .collection-head .tabs > button:nth-child(3) {
  width: 135px;
}
body[data-view='opportunities'] main > .filters {
  padding: 0;
  border: 0;
  border-radius: 0;
  margin: 14px 9px 13px;
  gap: 10px;
  background: transparent;
}
body[data-view='opportunities'] main > .filters > select {
  flex: 1;
}
body[data-view='opportunities'] main > .filters > [data-action='filter-dates'] {
  flex: 1.16;
  justify-content: flex-start;
  height: 38px;
}
body[data-view='opportunities'] main > .filters > .search-field {
  flex: 1.45;
}
body[data-view='opportunities'] .kanban {
  gap: 7px;
  grid-auto-columns: minmax(165px, 1fr);
}
body[data-view='opportunities'] .kanban-heading {
  height: 87px;
  padding: 11px 14px;
}
body[data-view='opportunities'] .kanban-heading h2 {
  font-size: 16px;
}
body[data-view='opportunities'] .kanban-heading > button {
  width: 18px;
  right: 10px;
  top: 10px;
}
body[data-view='opportunities'] .kanban-heading > button .icon {
  transform: rotate(90deg);
  stroke-width: 2.8;
}
body[data-view='opportunities'] .kanban-card {
  height: 162px;
  min-height: 162px;
  margin: 4px 5px 0;
  padding: 12px 10px 8px;
}
body[data-view='opportunities'] .kanban-card h3 {
  font-size: 13px;
  line-height: 16px;
  padding-right: 10px;
}
body[data-view='opportunities'] .kanban-card p {
  margin-top: 2px;
  font-size: 13px;
  line-height: 17px;
}
body[data-view='opportunities'] .kanban-card > strong {
  font-size: 15px;
  line-height: 18px;
  margin: 4px 0;
}
body[data-view='opportunities'] .kanban-card .due {
  font-size: 12px;
  line-height: 17px;
  gap: 6px;
}
body[data-view='opportunities'] .kanban-card .category-tag {
  margin-top: 5px;
  padding: 3px 8px;
  font-size: 12px;
  line-height: 16px;
}
body[data-view='opportunities'] .kanban-card footer {
  margin-top: 6px;
  gap: 8px;
  justify-content: flex-end;
}
body[data-view='opportunities'] .board-owner {
  margin-right: auto;
  display: flex;
}
body[data-view='opportunities'] .board-owner .avatar {
  width: 24px;
  height: 24px;
  font-size: 12px;
}
body[data-view='opportunities'] .board-count {
  border: 0;
  padding: 1px;
  min-height: 24px;
  gap: 4px;
  font-size: 12px;
  background: transparent;
}
body[data-view='opportunities'] .board-count .icon {
  width: 14px;
  height: 14px;
}
body[data-view='opportunities'] .kanban-card .card-more .icon {
  stroke-width: 2.8;
}
body[data-view='opportunities'] .kanban-column > .btn {
  margin-top: 5px;
  height: 33px;
}
body[data-view='opportunities'] .right-panel .pipeline-statistics .card-heading {
  padding: 7px 10px;
  min-height: 40px;
  gap: 4px;
}
body[data-view='opportunities'] .pipeline-statistics .card-heading h2 {
  font-size: 13px;
  gap: 7px;
  white-space: nowrap;
}
body[data-view='opportunities'] .pipeline-statistics .card-heading h2 > .icon {
  width: 18px;
  height: 18px;
}
body[data-view='opportunities'] .pipeline-statistics .card-heading > .btn {
  font-size: 10px;
  gap: 3px;
  padding: 4px;
  min-height: 27px;
}
body[data-view='opportunities'] .pipeline-statistics .card-heading > .btn .icon {
  order: 2;
  width: 11px;
  height: 11px;
}
body[data-view='opportunities'] .pipeline-statistics .details {
  padding: 0 10px 9px;
}
body[data-view='opportunities'] .pipeline-statistics .details dt {
  font-size: 13px;
  white-space: nowrap;
}
body[data-view='opportunities'] .pipeline-statistics .details dd {
  font-size: 15px;
  white-space: nowrap;
}
body[data-view='opportunities'] .pipeline-metrics .details {
  padding: 3px 10px;
}
body[data-view='opportunities'] .pipeline-metrics .details dt {
  font-size: 12px;
  white-space: nowrap;
}
body[data-view='opportunities'] .pipeline-metrics .details dd {
  font-size: 14px;
}
body[data-view='opportunities'] .pipeline-metrics .details > div {
  min-height: 26px;
  padding: 3px 0;
}
body[data-view='opportunities'] #right-content {
  gap: 10px;
}
body[data-view='opportunities'] .ai-card {
  min-height: 176px;
}
@media (min-width: 1201px) {
  body[data-view='opportunities'] {
    --right: 283px;
  }
  body[data-view='opportunities'] main {
    padding-right: 8px;
  }
  body[data-view='opportunities'] .collection-head.collection-head {
    display: grid;
    grid-template-columns: 362px minmax(190px, 260px) 1fr;
    align-items: start;
    column-gap: 12px;
    row-gap: 0;
  }
  body[data-view='opportunities'] .collection-head > .page-heading.page-heading {
    grid-column: 1/-1;
    grid-row: 1;
    margin-bottom: 0;
  }
  body[data-view='opportunities'] .collection-head > .tabs.tabs {
    grid-column: 1;
    grid-row: 2;
    margin: 18px 0 0;
    width: 362px;
    max-width: 100%;
  }
  body[data-view='opportunities'] .crm-pipeline-picker {
    grid-column: 2;
    grid-row: 2;
    margin: 18px 0 0;
    height: 40px;
  }
  body[data-view='opportunities'] .crm-pipeline-picker select {
    height: 38px;
  }
}
@media (max-width: 1200px) {
  body[data-view='opportunities'] main > .filters {
    flex-wrap: wrap;
  }
  body[data-view='opportunities'] .collection-head {
    padding-right: 16px;
  }
}

body[data-view='opportunities'] .collection-head .tabs > button {
  flex: none;
}
body[data-view='opportunities'] .pipeline-statistics .details > div {
  min-height: 28px;
  padding: 3px 0;
}
body[data-view='opportunities'] main > .filters {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}
body[data-view='opportunities'] main > .filters > .view-controls {
  flex: 1 1 430px;
  width: auto;
}
body[data-view='opportunities'] main > .filters > .commercial-period-controls {
  flex: 0 1 215px;
  width: auto;
}
body[data-view='opportunities'] main > .filters > .view-controls,
body[data-view='opportunities'] main > .filters > .commercial-period-controls {
  min-width: 0;
}
.commercial-period-controls {
  display: flex;
  gap: 5px;
  min-width: 0;
}
.commercial-period-controls > [data-action='filter-dates'] {
  flex: 1;
  justify-content: flex-start;
  height: 38px;
  min-width: 0;
}
.commercial-period-controls > [data-action='clear-commercial-dates'] {
  width: 28px;
  flex: none;
  height: 38px;
  padding: 4px;
}
@media (max-width: 1200px) {
  body[data-view='opportunities'] main > .filters {
    flex-wrap: wrap;
  }
}
@media (max-width: 600px) {
  body[data-view='opportunities'] .collection-head .page-heading {
    flex-wrap: wrap;
  }
  body[data-view='opportunities'] .collection-head .page-heading > .btn {
    width: 100%;
    justify-content: center;
  }
}

@media (min-width: 1300px) and (max-width: 1549px) {
  body[data-view='opportunities'] .brand {
    min-width: 247px;
  }
  body[data-view='opportunities'] .global-search {
    width: min(51.52vw, 746px);
  }
  body[data-view='opportunities'] .top-actions > [data-action='settings'] {
    display: none;
  }
}
/* Manufacturing: reference proportions and an independent operation timeline. */
.mfg-quality-icon.yellow {
  background: #fff5d9;
  color: #b67a00;
}
.mfg-quality-icon.red {
  background: #ffe8eb;
  color: #ed354e;
}
.operation-menu .icon {
  width: 18px;
  height: 18px;
  stroke-width: 2.5;
  color: #455fa0;
}
.mfg-step .operation-row {
  padding: 0;
  gap: 0;
}
.operation-body {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  flex: 1;
  min-width: 0;
  border: 0;
  border-radius: 7px;
  background: transparent;
  text-align: left;
  font: inherit;
  color: inherit;
}
.operation-body > div {
  flex: 1;
  min-width: 0;
}
.operation-body .operation-number,
.operation-body .badge {
  flex: none;
}
.operation-row > .operation-menu {
  flex: none;
  margin-right: 5px;
  padding: 4px;
  border: 0;
  min-width: 25px;
  min-height: 30px;
  background: transparent;
}
.operation-body:hover,
.operation-menu:hover {
  background: #f4f7ff;
}
.operation-body:focus-visible,
.operation-menu:focus-visible {
  outline: 2px solid #4e88ff;
  outline-offset: 1px;
}
.quality-current {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.quality-current > span:last-child {
  color: var(--muted);
}
.quality-checks {
  padding: 0 16px 16px;
  display: grid;
  gap: 12px;
}
.quality-checks article {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 14px;
}
.quality-checks article header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.quality-checks p {
  margin: 8px 0;
}
.quality-notes {
  white-space: pre-wrap;
}
.quality-checks small {
  color: var(--muted);
}
.mfg-step {
  position: relative;
  padding-left: 28px;
}
.mfg-step:not(:last-child):before {
  content: '';
  position: absolute;
  left: 8px;
  top: 32px;
  bottom: -25px;
  width: 1px;
  background: #c4cddd;
}
.mfg-step.completed:before {
  background: #2ccc96;
}
.mfg-step-marker {
  position: absolute;
  left: 0;
  top: 24px;
  width: 18px;
  height: 18px;
  border: 2px solid #647bb6;
  background: white;
  border-radius: 50%;
  display: grid;
  place-items: center;
  z-index: 1;
}
.mfg-step.completed .mfg-step-marker {
  background: #20c98f;
  border-color: #20c98f;
  color: white;
}
.mfg-step.active .mfg-step-marker {
  background: #448eff;
  border-color: #448eff;
  box-shadow: inset 0 0 0 4px white;
}
.mfg-step-marker .icon {
  width: 12px;
  height: 12px;
}
.operation-row > .icon {
  width: 14px;
  flex: none;
  color: #455fa0;
}
.mfg-resource-icon,
.mfg-quality-icon {
  width: 42px;
  height: 42px;
  flex: none;
  display: grid;
  place-items: center;
  background: #eaf3ff;
  color: #236cff;
  border-radius: 50%;
}
.mfg-quality-icon {
  background: #e9fbf1;
  color: #00bd84;
}
.mfg-owner-avatar .avatar {
  background: #f0e7ff;
  color: #7041ff;
}
.mfg-resource-icon .icon,
.mfg-quality-icon .icon {
  width: 25px;
  height: 25px;
}
.manufacturing-progress dt:before,
.consumption-dot {
  content: '';
  display: inline-block;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #22ce91;
  margin-right: 8px;
}
.manufacturing-progress dl > div:nth-child(2) dt:before {
  background: #4e94ff;
}
.manufacturing-progress dl > div:nth-child(3) dt:before {
  background: #99a6bd;
}
.manufacturing-progress dl > div:nth-child(2) dd {
  color: #4e79cb;
}
.manufacturing-progress dl > div:nth-child(3) dd {
  color: #8090ad;
}
.consumption-dot.blue {
  background: #4e94ff;
}
.consumption-dot.yellow {
  background: #ffc43b;
}
.mfg-documents {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  padding: 8px 10px 16px;
}
.mfg-documents button {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 12px 10px;
  background: white;
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 7px;
  text-align: left;
  min-width: 0;
}
.mfg-documents .icon {
  width: 19px;
  height: 22px;
  color: var(--orange);
  grid-row: 1/3;
}
.mfg-documents strong {
  font-size: 13px;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mfg-documents small,
.mfg-documents time {
  font-size: 12px;
  color: var(--muted);
}
.mfg-documents time {
  grid-column: 1/-1;
  padding-left: 3px;
}
@media (min-width: 1550px) {
  body[data-view='manufacturing'] {
    --dossier: 165px;
    --right: 338px;
  }
  body[data-view='manufacturing'] main {
    padding-left: 17px;
    padding-right: 25px;
  }
  body[data-view='manufacturing'] .page-heading h1 {
    font-size: 32px;
  }
  body[data-view='manufacturing'] .page-heading {
    gap: 20px;
  }
  body[data-view='manufacturing'] .page-heading > .icon {
    width: 48px;
    height: 48px;
  }
  .mfg-summary-stats {
    min-height: 95px;
    margin-bottom: 20px;
  }
  .manufacturing-summary {
    grid-template-columns: 1.55fr 1fr 1.02fr 1.04fr;
  }
  .manufacturing-summary > .card {
    min-height: 153px;
  }
  .manufacturing-grid > .card > .card-heading h2 > .icon,
  .manufacturing-grid > div > .card > .card-heading h2 > .icon {
    display: none;
  }
  .manufacturing-operations {
    padding: 3px 12px 12px 14px;
  }
  .operation-row {
    min-height: 63px;
    gap: 9px;
    padding: 8px;
  }
  .operation-row > div {
    min-width: 0;
  }
  .operation-row h3 {
    font-size: 13px;
  }
  .operation-row time {
    min-width: 80px;
  }
  .operation-row .badge {
    padding: 6px 9px;
  }
  .manufacturing-grid .data-table td {
    height: 34px;
  }
  .manufacturing-grid .data-table th {
    height: 36px;
  }
  .mfg-info {
    min-height: 62px;
    gap: 10px;
    padding-left: 14px;
    padding-right: 8px;
  }
  .mfg-info h3 {
    font-size: 14px;
  }
  .manufacturing-progress {
    gap: 16px;
    padding-left: 15px;
    padding-right: 14px;
  }
  .manufacturing-progress dl {
    font-size: 12px;
  }
  .manufacturing-summary .card-heading {
    padding-top: 12px;
    padding-bottom: 11px;
  }
}

@media (min-width: 1550px) {
  body[data-view='manufacturing'] .layout.with-dossier main {
    padding-left: 17px;
    padding-right: 25px;
  }
  body[data-view='manufacturing'] .page-heading > div {
    gap: 20px;
  }
  body[data-view='manufacturing'] .page-icon .icon {
    width: 48px;
    height: 48px;
  }
  .manufacturing-summary .card-heading {
    padding-bottom: 6px;
  }
  .manufacturing-progress {
    padding-bottom: 10px;
  }
  .manufacturing-summary > .card {
    min-height: 152px;
  }
  .manufacturing-grid .card-heading {
    min-height: 40px;
    padding-top: 7px;
    padding-bottom: 7px;
  }
  .operation-row {
    min-height: 57px;
    margin: 3px 0;
    gap: 8px;
  }
  .operation-row time {
    min-width: 88px;
  }
  .operation-row > .icon {
    display: block;
  }
  .mfg-step-marker {
    top: 21px;
  }
  .manufacturing-grid .data-table th {
    height: 34px;
  }
  .mfg-summary-stats .stat small {
    white-space: nowrap;
  }
  .mfg-summary-stats .stat:nth-child(5) > div {
    display: flex;
    flex-direction: column;
    gap: 6px;
  }
  .mfg-summary-stats .stat:nth-child(5) strong {
    order: 2;
    font-size: 15px;
  }
  .mfg-summary-stats .stat:nth-child(5) > div > span {
    order: 1;
  }
  .mfg-summary-stats .stat:nth-child(4) .stat-icon {
    color: var(--ink);
  }
  .mfg-summary-stats .stat:nth-child(5) .stat-icon {
    color: var(--green);
  }
}
@media (min-width: 1550px) {
  body[data-view='manufacturing'] .mfg-summary-stats {
    height: 95px;
    grid-template-columns: 1.65fr 1.1fr 0.9fr 0.9fr 0.9fr 1.1fr 1fr;
  }
  body[data-view='manufacturing'] .mfg-summary-stats .stat {
    min-width: 0;
    padding: 9px 7px;
    gap: 7px;
  }
  body[data-view='manufacturing'] .mfg-summary-stats .stat > div {
    min-width: 0;
  }
  body[data-view='manufacturing'] .mfg-summary-stats .stat strong {
    display: block;
    font-size: 15px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  body[data-view='manufacturing'] .mfg-summary-stats .stat:first-child strong {
    font-size: 14px;
  }
  body[data-view='manufacturing'] .mfg-summary-stats .stat > div > span {
    display: block;
    font-size: 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  body[data-view='manufacturing'] .mfg-summary-stats .stat:nth-child(5) > div {
    display: block;
  }
  body[data-view='manufacturing'] .mfg-summary-stats .stat:nth-child(5) strong {
    font-size: 15px;
  }
  body[data-view='manufacturing'] .mfg-summary-stats .stat:nth-child(5) .stat-icon {
    color: var(--ink);
  }
  body[data-view='manufacturing'] .mfg-summary-stats .stat:nth-child(6) > div {
    display: flex;
    flex-direction: column;
    gap: 6px;
  }
  body[data-view='manufacturing'] .mfg-summary-stats .stat:nth-child(6) strong {
    order: 2;
  }
  body[data-view='manufacturing'] .mfg-summary-stats .stat:nth-child(6) > div > span {
    order: 1;
  }
  body[data-view='manufacturing'] .mfg-summary-stats .stat:nth-child(6) .stat-icon {
    color: var(--green);
  }
  body[data-view='manufacturing'] .manufacturing-summary > .card {
    height: 152px;
  }
  body[data-view='manufacturing'] .operation-body > div {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    column-gap: 7px;
  }
  body[data-view='manufacturing'] .operation-body > div > h3 {
    grid-column: 1/-1;
  }
  body[data-view='manufacturing'] .operation-body > div > p {
    margin-top: 3px;
  }
  body[data-view='manufacturing'] .operation-body > div > p:last-child {
    white-space: nowrap;
    text-align: right;
  }
}
@media (min-width: 1550px) {
  body[data-view='manufacturing'] .mfg-summary-stats .stat {
    gap: 4px;
  }
  body[data-view='manufacturing'] .mfg-summary-stats .stat-icon > .icon {
    width: 20px;
    height: 20px;
  }
  body[data-view='manufacturing'] .mfg-summary-stats .stat strong,
  body[data-view='manufacturing'] .mfg-summary-stats .stat:first-child strong,
  body[data-view='manufacturing'] .mfg-summary-stats .stat:nth-child(5) strong {
    font-size: 13px;
    text-overflow: clip;
  }
  body[data-view='manufacturing'] .mfg-summary-stats .stat:last-child strong {
    white-space: normal;
    line-height: 1.2;
  }
  body[data-view='manufacturing'] .mfg-summary-stats .stat > div > span {
    font-size: 9px;
  }
  body[data-view='manufacturing'] .operation-body > div {
    column-gap: 3px;
  }
  body[data-view='manufacturing'] .operation-body > div > p {
    font-size: 10px;
    white-space: nowrap;
  }
}
.task-filter-controls {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 16px 0 12px;
}
.task-filter-controls > label {
  display: flex;
  align-items: center;
  min-width: 0;
  flex: 1;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding-left: 10px;
  font-size: 12px;
  white-space: nowrap;
  color: var(--blue);
}
.task-filter-controls select {
  border: 0;
  background: transparent;
  min-width: 0;
  width: 100%;
  font-size: 12px;
  padding: 9px 5px;
  cursor: pointer;
}
.task-filter-controls > .btn {
  height: 36px;
  min-height: 36px;
}
.task-unassigned {
  width: 24px;
  height: 24px;
  background: #f1f4f9;
  color: #7c8cb0;
  display: grid;
  place-items: center;
  border-radius: 50%;
  flex: none;
}
.task-unassigned .icon {
  width: 16px;
  height: 16px;
}
.task-card p.task-assignment {
  font-size: 11px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: var(--muted);
  margin-top: 3px;
}
.task-empty {
  border: 1px dashed var(--line);
  padding: 12px;
  color: var(--muted);
  margin-bottom: 12px;
  border-radius: 6px;
}
@media (max-width: 1200px) {
  .task-filter-controls > label {
    flex: 1 1 28%;
  }
}
body[data-view='gantt'] .task-filter-controls {
  margin: 12px 0 10px;
}

/* Task and planning density follows the two 1448 × 1086 references. */
@media (min-width: 1201px) {
  body:is([data-view='tasks'], [data-view='gantt']) .layout.with-dossier main {
    padding-top: 8px;
  }
  body:is([data-view='tasks'], [data-view='gantt']) .project-hero {
    height: 140px;
  }
  body:is([data-view='tasks'], [data-view='gantt']) main > .tabs {
    min-height: 38px;
    height: 38px;
  }
  body:is([data-view='tasks'], [data-view='gantt']) main > .tabs > button {
    padding-block: 7px;
  }
  body[data-view='tasks'] .task-filter-controls {
    margin-bottom: 15px;
  }
  .task-board {
    height: 520px;
    min-height: 0;
    align-items: stretch;
  }
  .task-board > .kanban-column {
    overflow-y: auto;
    scrollbar-width: thin;
  }
  .task-board .kanban-heading {
    position: sticky;
    top: 0;
    z-index: 2;
    min-height: 42px;
    padding: 11px 10px;
  }
  .task-board .kanban-card {
    min-height: 106px;
  }
  .task-board .task-card h3 {
    min-height: 0;
    font-size: 13px;
    line-height: 1.2;
  }
  .task-board .task-card p {
    margin-top: 5px;
  }
  .task-board .task-card footer {
    margin-top: 6px;
  }
  .task-board .task-card .task-date {
    margin-top: 6px;
  }
  .task-board + .section-space {
    margin-top: 10px;
  }
  .gantt {
    --label: 41%;
  }
}
.gantt-row {
  height: 26px;
}
.gantt-row.milestone-row {
  height: 35px;
}
.gantt-bar {
  top: 5px;
}

.task-priority {
  border-radius: 5px;
  gap: 5px;
}
.task-priority i {
  width: 8px;
  height: 8px;
  background: currentColor;
  border-radius: 50%;
}
.backlog-cards .backlog-task {
  padding: 8px 10px;
  min-height: 80px;
}
.backlog-task h3 {
  min-height: 0;
  font-size: 13px;
}
.backlog-task p {
  margin-top: 4px;
}
.backlog-task footer {
  margin-top: 5px;
  gap: 8px;
}
.backlog-duration {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--muted);
}
.backlog-duration .icon {
  width: 13px;
  height: 13px;
}
.backlog-task footer .avatar {
  width: 21px;
  height: 21px;
}
.backlog-task .task-priority {
  font-size: 11px;
  padding: 4px 6px;
}
.gantt-controls {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 9px;
  margin: 12px 0;
}
.gantt-controls .task-filter-controls {
  display: contents;
}
.gantt-period-controls {
  display: flex;
  grid-column: 1/3;
  gap: 0;
  min-width: 0;
}
.gantt-period-controls .btn {
  border-radius: 0;
  padding: 7px;
  min-width: 0;
}
.gantt-period-controls [data-action='gantt-period'] {
  flex: 1;
  font-size: 11px;
  white-space: nowrap;
}
.gantt-period-controls .btn:first-child {
  border-radius: 6px 0 0 6px;
}
.gantt-period-controls .btn:last-child {
  border-radius: 0 6px 6px 0;
}
.gantt-period-controls .btn:first-child .icon {
  transform: rotate(180deg);
}
.gantt-controls .task-filter-controls > label {
  padding-left: 7px;
  font-size: 11px;
}
.gantt-controls .task-filter-controls > label:nth-child(4) {
  grid-column: 1;
  grid-row: 2;
}
.gantt-controls .task-filter-controls > label:nth-child(5) {
  grid-column: 2;
  grid-row: 2;
}
.gantt-controls .task-filter-controls > label:nth-child(6) {
  grid-column: 6;
  grid-row: 1;
}
.gantt-viewport-controls {
  grid-column: 3/7;
  grid-row: 2;
  margin: 0 !important;
  gap: 6px;
}
.gantt-viewport-controls .btn {
  padding: 7px 10px;
  font-size: 12px;
}
.gantt-viewport-controls > span:not(.spacer) {
  font-size: 12px;
  white-space: nowrap;
}
.gantt-controls [data-action='clear-task-filters'] {
  grid-column: 6;
  justify-self: end;
}
.gantt-controls .btn.square {
  width: 32px;
  min-width: 28px;
}
.gantt-row.group-row .gantt-label {
  grid-template-columns: 28px 1fr 38px;
}
.gantt-week-grid {
  position: absolute;
  left: var(--label);
  right: 0;
  top: 0;
  bottom: 0;
  display: flex;
  pointer-events: none;
}
.gantt-week-grid > span {
  border-right: 1px solid #eaf0f7;
  flex: none;
}
.gantt-timeline {
  background-image: none;
}
.gantt-header.weeks span {
  flex: none;
}
.gantt-legend label {
  display: flex;
  align-items: center;
  gap: 10px;
}
.gantt-legend input[data-critical] {
  appearance: none;
  width: 37px;
  height: 20px;
  background: #d2d9e7;
  border-radius: 15px;
  cursor: pointer;
  position: relative;
  border: 0;
}
.gantt-legend input[data-critical]:before {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  background: white;
  border-radius: 50%;
  left: 2px;
  top: 2px;
  box-shadow: 0 1px 3px #7893;
}
.gantt-legend input[data-critical]:checked {
  background: #8852ff;
}
.gantt-legend input[data-critical]:checked:before {
  left: 19px;
}
.gantt-legend input[data-critical]:focus-visible {
  outline: 2px solid #264fa5;
  outline-offset: 3px;
}
.gantt-context {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.gantt-context .card-heading {
  padding: 10px 12px;
}
.gantt-context .card-heading h2 {
  font-size: 14px;
}
.gantt-context .card-heading .btn {
  padding: 3px;
  min-height: 24px;
}
.gantt-status {
  display: flex;
  gap: 16px;
  align-items: center;
  padding: 8px 14px 18px;
}
.gantt-status .donut {
  width: 88px;
  height: 88px;
}
.gantt-status dl {
  font-size: 12px;
  flex: 1;
  margin: 0;
}
.gantt-status dl > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 15px 0;
}
.gantt-status dt {
  white-space: nowrap;
  color: var(--muted);
}
.gantt-status dt i {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: currentColor;
  margin-right: 7px;
}
.gantt-status dd {
  margin: 0;
  color: var(--blue);
  white-space: nowrap;
}
.gantt-status dl > div:first-child dd {
  color: var(--green);
}
.gantt-next {
  display: flex;
  gap: 12px;
  padding: 8px 14px 15px;
  text-align: left;
  width: 100%;
  border: 0;
  background: none;
}
.gantt-next > .icon {
  width: 19px;
  color: var(--purple);
  flex: none;
}
.gantt-next strong {
  font-size: 13px;
}
.gantt-next p {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
}
.gantt-next .badge {
  font-size: 11px;
  white-space: nowrap;
}
.gantt-context-milestones {
  padding: 0 12px 10px;
}
.gantt-context-milestones > button {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  border: 0;
  background: none;
  border-bottom: 1px solid var(--line);
  padding: 11px 0;
  text-align: left;
}
.gantt-context-milestones > button:last-child {
  border: 0;
}
.gantt-context-milestones .icon {
  width: 18px;
  height: 18px;
}
.gantt-context-milestones strong {
  font-size: 12px;
  flex: 1;
  font-weight: 400;
  color: var(--muted);
}
.gantt-context-milestones time {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}
.gantt-context + .card .resource-list {
  gap: 13px;
}
.gantt-context + .card .resource-list > small {
  font-size: 10px;
}
@media (max-width: 1200px) {
  .gantt-controls {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .gantt-period-controls {
    grid-column: 1/4;
  }
  .gantt-controls .task-filter-controls > label:nth-child(n) {
    grid-column: auto;
    grid-row: auto;
  }
  .gantt-viewport-controls {
    grid-column: 1/4;
    grid-row: auto;
  }
  .gantt-controls [data-action='clear-task-filters'] {
    grid-column: 3;
  }
}

.gantt-context .card-heading {
  min-height: 40px;
  padding: 8px 12px;
}
.gantt-status {
  gap: 10px;
  padding: 8px 10px 16px;
}
.gantt-status .donut {
  width: 80px;
  height: 80px;
}
.gantt-status dl {
  min-width: 0;
  font-size: 11px;
}
.gantt-status dl > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 5px;
  margin: 9px 0;
}
.gantt-status dt {
  white-space: normal;
  font-size: 11px;
}
.gantt-status dt i {
  margin-right: 5px;
  width: 8px;
  height: 8px;
}
.gantt-next {
  padding: 4px 12px 12px;
  gap: 8px;
}
.gantt-next > .icon {
  width: 16px;
}
.gantt-next p {
  gap: 7px;
  margin-top: 7px;
}
.gantt-next .badge {
  font-size: 10px;
  padding: 4px 7px;
}
.gantt-context-milestones {
  padding-bottom: 8px;
}
.gantt-context-milestones > button {
  padding: 8px 0;
}
.gantt-context + .card .card-heading {
  min-height: 40px;
  padding: 8px 12px;
}
.gantt-context + .card .card-heading h2 {
  font-size: 14px;
}
.gantt-context + .card .resource-list {
  gap: 10px;
}
.project-team-editor {
  grid-column: 1/-1;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px;
  display: grid;
  gap: 12px;
}
.project-team-editor > div {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  align-items: center;
  gap: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}
.project-team-editor > div:last-child {
  border: 0;
  padding-bottom: 0;
}
.project-team-editor > div > label:first-child {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
}
.project-team-editor input[type='checkbox'] {
  width: 16px;
  flex: none;
}
.project-team-editor > div > label:nth-child(2) {
  font-size: 12px;
  color: var(--muted);
}
.project-team-editor input:not([type='checkbox']) {
  font-size: 14px;
}
.project-history-row {
  align-items: flex-start;
}
.project-history-row > .avatar {
  width: 32px;
  height: 32px;
  flex: none;
}
.project-history-row > div {
  min-width: 0;
  flex: 1;
}
.project-history-row .history-object {
  font-size: 12px;
  color: var(--blue);
  overflow-wrap: anywhere;
}
.project-history-row small {
  font-size: 11px;
  color: var(--muted);
}
.project-history-row > .btn {
  padding: 3px;
  min-height: 24px;
}
.project-discussion-note {
  padding: 14px;
  border-top: 1px solid var(--line);
}
.project-discussion-note header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 9px;
}
.project-discussion-note header small {
  font-size: 12px;
  color: var(--muted);
}
.project-discussion-note p {
  white-space: pre-wrap;
  color: var(--blue);
  line-height: 1.5;
  overflow-wrap: anywhere;
}

body[data-view='project'] .person-row {
  padding: 5px 12px;
  gap: 12px;
}
body[data-view='project'] .person-row > .avatar {
  width: 40px;
  height: 40px;
}
body[data-view='project'] .person-row p {
  margin: 2px 0 0;
}

body[data-view='project'] .indicator-list {
  gap: 12px;
}
body[data-view='project'] .person-row {
  padding-top: 4px;
  padding-bottom: 4px;
}
body[data-view='project'] .document-list > button {
  padding-top: 7px;
  padding-bottom: 7px;
}

.project-deadline-row {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  padding: 10px 13px;
  border: 0;
  border-top: 1px solid #edf1f7;
  border-radius: 0;
  background: #fff;
  color: var(--navy);
  min-height: 49px;
}
.project-deadline-row:hover {
  background: #f8faff;
}
.project-deadline-row:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: -2px;
}
.project-deadline-row .deadline-icon {
  width: 29px;
  height: 32px;
  flex: none;
  display: grid;
  place-items: center;
  background: #fff4ed;
  border-radius: 7px;
  color: var(--orange);
}
.project-deadline-row .deadline-icon > .icon {
  width: 21px;
  height: 21px;
}
.project-deadline-row .deadline-title {
  flex: 1;
  min-width: 0;
  font-size: 14px;
  overflow-wrap: anywhere;
}
.project-deadline-row small {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-top: 3px;
}
.project-deadline-row em {
  font-style: normal;
  color: #d44924;
}
.project-deadline-row time {
  font-size: 12px;
  white-space: nowrap;
  text-align: right;
  color: var(--muted);
  flex: none;
}
body[data-view='project'] .milestone-list > button {
  padding-block: 8px;
}
@media (min-width: 1201px) and (max-width: 1550px) {
  body[data-view='project'] {
    --dossier: 155px;
    --right: 280px;
  }
  body[data-view='project'] .record-heading {
    flex-wrap: wrap;
    gap: 4px;
  }
  body[data-view='project'] .record-heading > .page-heading {
    flex-basis: 100%;
  }
  body[data-view='project'] .record-heading > small {
    font-size: 11px;
    text-align: left;
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
  }
  body[data-view='project'] .record-heading h1 {
    font-size: 29px;
  }
  body[data-view='project'] .project-hero {
    grid-template-columns: 160px minmax(165px, 1fr) minmax(285px, 1.5fr);
    gap: 12px;
  }
  body[data-view='project'] .project-hero .hero-photo {
    height: 155px;
  }
  body[data-view='project'] .hero-metrics .stat {
    gap: 7px;
    padding: 6px;
  }
  body[data-view='project'] .hero-metrics .stat strong {
    font-size: 17px;
    white-space: normal;
    overflow-wrap: normal;
  }
  body[data-view='project'] .hero-metrics .stat-icon {
    flex: none;
  }
  body[data-view='project'] .project-overview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  body[data-view='project'] .project-overview-grid > .card-heading {
    flex-wrap: wrap;
  }
  body[data-view='project'] .dossier nav > a {
    gap: 6px;
  }
  body[data-view='project'] .person-row > .badge {
    font-size: 11px;
    padding: 5px 7px;
  }
}

.project-deadline-row {
  padding-block: 8px;
  line-height: 1.2;
}

@media (min-width: 1201px) and (max-width: 1550px) {
  body[data-view='project'] .record-heading > .record-metadata {
    flex-direction: row;
  }
  body[data-view='project'] .project-overview-grid .card-heading {
    flex-wrap: wrap;
  }
}

.project-costs > .toolbar {
  margin: 14px 0 8px;
}
.cost-source {
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
  margin: 10px 0 16px;
}
.project-cost-metrics {
  margin: 14px 0;
}
.project-cost-metrics > .stat {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 14px 12px;
  min-width: 0;
}
.project-cost-metrics .stat strong {
  font-size: 20px;
  white-space: normal;
}
.project-cost-details {
  margin-top: 16px;
}
.cost-comparison {
  padding: 4px 16px 18px;
  display: grid;
  gap: 18px;
}
.cost-comparison p {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
  font-size: 14px;
}
.cost-comparison strong {
  color: var(--navy);
  white-space: nowrap;
}
.cost-warning {
  padding: 12px 14px;
  background: #fff1ed;
  border: 1px solid #ffe1d7;
  border-radius: 6px;
  color: #b4422b;
  margin: 12px 0;
}
.project-cost-details .details dd {
  white-space: normal;
}
.project-cost-metrics .red {
  color: #e43f49;
}
.project-hero .hero-metrics strong > .red {
  color: #e43f49;
}
@media (max-width: 1550px) {
  .project-costs .project-cost-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .project-costs .project-cost-details {
    grid-template-columns: 1fr;
  }
}

.project-no-photo {
  height: 100%;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: #f4f7fc;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
}
.project-no-photo > .icon {
  width: 42px;
  height: 42px;
}
.project-no-photo > small {
  font-size: 12px;
}

/* Commandes accessibles depuis le flux des dossiers. */
#dialog:has(.project-purchases-panel) {
  width: min(980px, calc(100vw - 40px));
}
.project-purchases-panel .data-table {
  min-width: 800px;
}
.project-purchases-panel .data-table td:last-child {
  min-width: 140px;
}
.project-purchases-panel .data-table td:last-child .btn {
  margin: 3px 0;
  display: flex;
  width: max-content;
  padding: 5px 8px;
}
.project-purchases-panel .data-table td:nth-child(2) {
  min-width: 175px;
  overflow-wrap: anywhere;
}
/* Flux : filtres, pagination et alertes des dossiers sélectionnés. */
.flow-stats > [data-flow-stat] {
  min-width: 0;
}
.flow-stats > [data-flow-stat] > .stat {
  height: 100%;
  border: 1px solid var(--line);
  border-radius: 7px;
}
.flow-stats [data-flow-stat='active'] .stat-icon {
  color: #428aff;
  background: #edf4ff;
}
.flow-stats [data-flow-stat='done'] .stat-icon {
  color: #00bd83;
  background: #e7faf1;
}
.flow-stats [data-flow-stat='late'] .stat-icon {
  color: var(--orange);
}
.flow-stats [data-flow-stat='invoiced'] strong {
  font-size: 24px;
}
body[data-view='flow'] .flow-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.flow-filters .search-field {
  min-width: 0;
}
.flow-filters select {
  width: auto;
  min-width: 0;
  max-width: 140px;
}
.flow-filters .btn {
  font-size: 12px;
  padding: 8px;
  min-width: 0;
}
.flow-period {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.flow-period .icon {
  flex: none;
}
.flow-period {
  justify-content: flex-start;
}
.flow-scope {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 24px;
  margin: -6px 0 6px;
  color: var(--muted);
  font-size: 12px;
}
.flow-scope .btn {
  font-size: 11px;
  min-height: 24px;
  padding: 3px 7px;
}
.flow-pagination {
  margin-top: 24px;
  font-size: 12px;
}
.flow-pagination .previous .icon {
  transform: rotate(180deg);
}
.flow-pagination .page-gap {
  margin: 0;
}
.flow-pagination button {
  padding: 6px;
  min-width: 30px;
}
.flow-pagination select {
  font-size: 12px;
  min-width: 98px;
}
.flow-pagination .btn:disabled {
  opacity: 0.4;
}
.flow-late-label {
  color: #e25228 !important;
}
.flow-legend i.late {
  background: #ff754c;
}
.flow-alerts .flow-alert {
  width: calc(100% - 24px);
  border: 1px solid #ffdadd;
  text-align: left;
  padding: 8px;
  gap: 8px;
}
.flow-alert small {
  font-size: 11px;
}
.flow-list {
  min-width: 850px;
}
.flow-list td {
  height: 66px;
}
.flow-list .meter {
  min-width: 90px;
}
.flow-list .badge {
  white-space: nowrap;
}
#dialog:has(.flow-report) {
  width: min(1050px, calc(100vw - 40px));
}
.flow-report > p {
  margin: 8px 0 16px;
  color: var(--muted);
  line-height: 1.5;
}
.flow-report-summary {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 12px 0;
}
.flow-report-summary strong {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  flex: 1;
  white-space: nowrap;
}
.flow-report .data-table {
  min-width: 780px;
}
.flow-report-deadline {
  display: block;
  padding: 6px 0;
  border-bottom: 1px solid var(--line);
}
.flow-report-deadline:last-child {
  border: 0;
}
@media (max-width: 1250px) {
  body[data-view='flow'] .flow-filters {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .flow-pagination {
    flex-wrap: wrap;
  }
}
/* Densité de la matrice à six dossiers de la référence. */
body[data-view='flow'] .flow-stats {
  margin-top: 12px;
  margin-bottom: 14px;
}
.flow-scope:not(:has(button)) {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  min-height: 0;
  margin: 0;
}
.flow-project {
  padding: 5px 2px;
}
.flow-project h3 {
  font-size: 13px;
  line-height: 1.2;
}
.flow-project p {
  line-height: 1.2;
  margin-top: 3px;
}
.flow-project > div > small {
  display: block;
  font-size: 10px;
  line-height: 1.2;
  margin-top: 3px;
}
.flow-project > div > div {
  margin-top: 5px;
  height: 9px;
}
.flow-project > div > div > small {
  margin: 0;
  font-size: 10px;
  line-height: 1;
}
.flow-project .flow-late-label {
  font-size: 10px;
  margin-top: 4px;
}
@media (min-width: 1251px) {
  body[data-view='flow'] main > .page-heading {
    margin-bottom: 8px;
  }
  body[data-view='flow'] .flow-stats {
    margin-top: 8px;
  }
  body[data-view='flow'] .flow-stats .stat {
    min-height: 115px;
  }
  body[data-view='flow'] .flow-head {
    min-height: 68px;
  }
  body[data-view='flow'] .flow-head > div {
    gap: 3px;
    padding: 7px 4px 5px;
  }
  body[data-view='flow'] .flow-head b {
    font-size: 11px;
    line-height: 1.1;
  }
  body[data-view='flow'] .flow-project h3 {
    font-size: 12px;
  }
}
body[data-view='flow'] .right-panel .card-heading {
  padding: 8px 12px;
  min-height: 38px;
}
body[data-view='flow'] .right-panel .card-heading h2 {
  font-size: 14px;
}
.flow-legend {
  gap: 8px;
  padding: 4px 13px 12px;
}
.flow-legend small {
  font-size: 10px;
  line-height: 1.25;
}
.flow-legend b {
  font-size: 12px;
  line-height: 1.3;
}
.flow-alerts .flow-alert b {
  font-weight: 500;
}
.flow-alerts .flow-alert {
  font-size: 12px;
}
.flow-alerts .flow-alert small {
  font-size: 10px;
  line-height: 1.2;
}

#dialog:has(.dossier-pieces, .customer-order) {
  width: min(970px, calc(100vw - 40px));
}
.dossier-pieces > p,
.customer-order > p {
  line-height: 1.5;
  color: var(--muted);
  margin: 4px 0 16px;
}
.dossier-pieces .data-table {
  min-width: 770px;
}
.customer-order .data-table {
  min-width: 750px;
}
.dossier-pieces .data-table td:last-child {
  width: 110px;
}
.dossier-pieces .data-table td .btn {
  padding: 6px 12px;
}
.dossier-pieces .data-table td {
  padding-block: 12px;
}
.customer-order .details {
  padding: 10px 0;
}
.flow-stage:has(.flow-count) {
  gap: 2px;
}
.flow-count {
  font-size: 9px;
  line-height: 1.1;
}

.article-heading > .product-placeholder {
  flex: 0 0 150px;
}
.article-prices[data-margin='red'] .stat:last-child strong {
  color: #d72d30;
}
.article-prices[data-margin='neutral'] .stat:last-child strong {
  color: var(--muted);
}
.article-choice {
  min-width: 0;
  margin: 0 0 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}
.article-choice legend {
  padding: 0 6px;
  font-weight: 700;
}
.article-choice p {
  margin: 0 0 12px;
  color: var(--muted);
}

.article-heading > .article-photo {
  width: 150px;
  height: 150px;
  flex: none;
  border: 1px solid var(--line);
  padding: 6px;
  background: white;
  border-radius: 6px;
  display: block;
  cursor: zoom-in;
}
.article-photo > .photo {
  display: block;
  width: 100%;
  height: 100%;
}
.article-photo-preview {
  grid-column: 1/-1;
  display: grid;
  place-items: center;
}
.article-photo-preview > .photo {
  width: min(100%, 540px);
  height: auto;
  max-height: 65vh;
  aspect-ratio: 1;
}
.article-photo > img.photo,
.article-photo-preview > img.photo {
  object-fit: contain;
}
.article-photo > .article-photo-empty,
.article-photo-preview > .article-photo-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 8px;
  color: var(--muted);
  background: #f7f9fc;
  border-radius: 4px;
}
.article-photo-empty > .icon {
  width: 38px;
  height: 38px;
}
.article-photo-empty > small {
  font-size: 12px;
}
.article-photo-options .project-photo-choice img {
  object-fit: contain;
}
@media (max-width: 1450px) {
  .article-heading > .article-photo {
    height: 190px;
  }
}

.component-edit-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

/* Article reference: compact tabs and three unequal content columns. */
body[data-view='article'] main > .tabs {
  width: max-content;
  max-width: 100%;
}
body[data-view='article'] main > .tabs > button {
  flex: none;
  padding-inline: 24px;
  padding-block: 9px;
}
body[data-view='article'] .article-grid > .card > .card-heading {
  min-height: 42px;
  padding: 6px 12px;
}
body[data-view='article'] .article-grid > .card > .card-heading h2 > .icon {
  color: var(--blue);
}
body[data-view='article'] .article-grid > .card:nth-child(3) > .card-heading h2 > .icon {
  color: var(--orange);
}
body[data-view='article'] .supplier-row > .btn {
  border: 0;
  padding: 3px;
  min-width: 24px;
  background: transparent;
}
body[data-view='article'] .supplier-row > div {
  min-width: 0;
}
body[data-view='article'] .supplier-row h3 {
  font-size: 14px;
  line-height: 20px;
}
body[data-view='article'] .supplier-row p {
  font-size: 13px;
  line-height: 17px;
  margin-top: 0;
}
body[data-view='article'] .supplier-logo {
  width: 67px;
}
body[data-view='article'] .supplier-row > .btn {
  width: 28px;
  height: 28px;
  flex: none;
  color: var(--blue);
}
body[data-view='article'] .supplier-row > .btn > .icon {
  width: 18px;
  height: 18px;
  stroke-width: 2.5;
}
body[data-view='article'] .supplier-row > .btn:hover {
  background: #f2f5fc;
}
body[data-view='article'] .supplier-row > .btn:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}
body[data-view='article'] .document-list > button {
  min-height: 48px;
  padding: 6px 12px;
  gap: 10px;
}
body[data-view='article'] .document-list > button > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
}
body[data-view='article'] .document-list > button > span > small {
  font-weight: 400;
  color: var(--muted);
}
body[data-view='article'] .document-list > button > small {
  flex: none;
  white-space: nowrap;
  color: var(--muted);
}
body[data-view='article'] .document-list > button > .icon {
  width: 23px;
  height: 27px;
  flex: none;
}
body[data-view='article'] .document-list .document-type-image {
  color: #386cff;
}
body[data-view='article'] .document-list .document-type-pdf {
  color: #ff3c3c;
}
body[data-view='article'] .document-list .document-type-file {
  color: var(--blue);
}
body[data-view='article'] .article-movements-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px;
  margin: 0;
}
body[data-view='article'] .article-movements-empty > .icon {
  width: 18px;
  height: 18px;
}
body[data-view='article'] .article-grid + .section-space .article-movements .card-heading {
  min-height: 34px;
  padding: 5px 12px;
}
body[data-view='article'] .article-grid + .section-space .article-movements th,
body[data-view='article'] .article-grid + .section-space .article-movements td {
  padding: 3px 9px;
  font-size: 12px;
}
body[data-view='article'] .article-grid + .section-space .article-movements .badge {
  padding: 1px 9px;
  font-size: 11px;
}
body[data-view='article'] .article-grid .card-body {
  font-size: 14px;
}
body[data-view='article'] .replenishment-stats {
  gap: 0;
  padding-top: 2px;
}
body[data-view='article'] .replenishment-stats .stat {
  min-height: 80px;
  padding: 9px;
}
body[data-view='article'] .replenishment-stats .stat:first-child .stat-icon {
  color: var(--blue);
}
body[data-view='article'] .replenishment-stats .stat:last-child .stat-icon {
  color: var(--green);
}
body[data-view='article'] .reorder-note {
  padding: 8px 12px;
  margin-top: 10px;
}
body[data-view='article'] .reorder-note > .icon {
  flex: none;
}
.article-depots {
  border: 1px solid var(--line);
  border-radius: 6px;
  margin: 9px 0;
}
.article-depots > div {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 3px 6px;
  border-bottom: 1px solid var(--line);
  color: var(--blue);
}
.article-depots > div:last-child {
  border: 0;
}
.article-depots .icon {
  width: 16px;
  height: 16px;
}
.article-depots span {
  min-width: 0;
  flex: 1;
}
.article-depots strong {
  font-weight: 400;
  white-space: nowrap;
  color: var(--navy);
}
.stock-unallocated {
  background: #fff8ec;
  color: #92621b;
  border-top: 1px solid var(--line);
}
.stock-global-balance {
  border-top: 1px solid var(--line);
}
.article-stock-details .data-table th:not(:first-child),
.article-stock-details .data-table td:not(:first-child) {
  text-align: right;
}
.article-stock-details [data-reservation] td:nth-child(2),
.article-stock-details [data-reservation] td:nth-child(3) {
  text-align: left;
}
.reorder-note[data-supply='needed'] {
  background: #fff0ed;
}
.reorder-note[data-supply='expected'] {
  background: #eff5ff;
}
.reorder-note[data-supply='expected'] strong,
.reorder-note[data-supply='expected'] > .icon {
  color: var(--blue);
}
.article-stock-link {
  background: #f5f7fc;
}
.article-stock-link > .icon {
  order: 2;
}
.logistics-stock-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0;
}
.logistics-stock-summary > div {
  min-width: 0;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}
.logistics-stock-summary small {
  display: block;
  color: var(--blue);
  font-size: 12px;
}
.logistics-stock-summary strong {
  display: block;
  margin-top: 3px;
  color: var(--navy);
  font-size: 21px;
}
.logistics-stock-filters {
  display: grid;
  grid-template-columns: minmax(220px, 2fr) repeat(3, minmax(145px, 1fr));
  gap: 9px;
  padding: 11px;
  margin: 12px 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}
.logistics-stock-filters label {
  display: grid;
  gap: 5px;
  min-width: 0;
  color: var(--blue);
  font-size: 12px;
  font-weight: 600;
}
.logistics-stock-filters input,
.logistics-stock-filters select {
  width: 100%;
  min-width: 0;
}
.logistics-stock-layout {
  display: grid;
  grid-template-columns: minmax(210px, 0.52fr) minmax(0, 1.48fr);
  gap: 12px;
  align-items: start;
}
.logistics-stock-layout > .card {
  min-width: 0;
}
.logistics-location-tree ul {
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.logistics-location-tree ul ul {
  margin-left: 13px;
}
.logistics-location-tree a {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
  gap: 6px;
  padding: 8px;
  border-radius: 7px;
  color: var(--navy);
  text-decoration: none;
}
.logistics-location-tree a:hover,
.logistics-location-tree a.active {
  background: #eef5ff;
  color: var(--blue);
}
.logistics-location-tree a small {
  grid-column: 2;
  color: var(--blue);
  font-size: 11px;
}
.logistics-location-tree .empty {
  padding: 8px;
  color: var(--blue);
  font-size: 13px;
}
.logistics-stock-table td {
  vertical-align: top;
}
.logistics-stock-table td > a {
  display: grid;
  gap: 2px;
  color: var(--navy);
  text-decoration: none;
}
.logistics-stock-table td > a:hover {
  color: var(--orange);
}
.logistics-stock-table td small {
  display: block;
  margin-top: 2px;
  color: var(--blue);
  font-size: 11px;
}
.logistics-stock-table td:nth-child(n + 3):not(:nth-child(6)) {
  text-align: right;
  white-space: nowrap;
}
.logistics-missions-table td {
  vertical-align: top;
}
.logistics-missions-table td > a {
  display: grid;
  gap: 3px;
  color: var(--navy);
  text-decoration: none;
}
.logistics-missions-table td > a:hover {
  color: var(--orange);
}
.logistics-missions-table td small {
  color: var(--blue);
  font-size: 11px;
}
.logistics-mission-steps {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.logistics-mission-step {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.logistics-mission-step > span {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #eef5ff;
  color: var(--blue);
}
.logistics-mission-step[data-status='completed'] > span {
  background: #e3faef;
  color: var(--green);
}
.logistics-mission-step div {
  display: grid;
  gap: 2px;
  min-width: 0;
  flex: 1;
}
.logistics-mission-step small {
  color: var(--blue);
  font-size: 11px;
}
@media (max-width: 900px) {
  .logistics-stock-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .logistics-stock-filters label:first-child {
    grid-column: 1/-1;
  }
  .logistics-stock-layout {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 600px) {
  body[data-view='stocks'] main {
    padding-inline: 16px;
  }
  .logistics-stock-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .logistics-stock-summary > div {
    padding: 10px;
  }
  .logistics-stock-summary strong {
    font-size: 18px;
  }
  .logistics-stock-filters {
    grid-template-columns: 1fr;
    padding: 9px;
  }
  .logistics-stock-filters label:first-child {
    grid-column: auto;
  }
  .logistics-location-tree a {
    padding: 7px;
  }
  .logistics-stock-table th,
  .logistics-stock-table td {
    padding: 8px 9px;
  }
}
@media (min-width: 1451px) {
  body[data-view='article'] {
    --right: 338px;
  }
  body[data-view='article'] main {
    padding-right: 30px;
  }
  body[data-view='article'] .right-panel {
    padding-left: 8px;
    padding-right: 12px;
  }
  body[data-view='article'] .article-heading .page-heading h1 {
    font-size: 30px;
  }
  body[data-view='article'] .article-summary {
    grid-template-columns: 1fr 1.15fr 1.15fr 1fr 1fr 0.9fr;
  }
  body[data-view='article'] .article-grid {
    grid-template-columns: 1.09fr 1fr 1fr;
    gap: 12px;
    margin-top: 12px;
  }
  body[data-view='article'] .article-grid > .card:nth-child(-n + 3) {
    min-height: 246px;
  }
  body[data-view='article'] .article-grid > .card:nth-child(n + 4) {
    min-height: 244px;
  }
  body[data-view='article'] .supplier-row {
    padding: 5px 13px;
    gap: 10px;
  }
  body[data-view='article'] .article-grid + .section-space {
    margin-top: 12px;
  }
}

body[data-view='article'] .article-heading .page-heading {
  margin-bottom: 7px;
}
body[data-view='article'] .supplier-row .badge {
  padding: 3px 8px;
}

@media (max-width: 1450px) {
  body[data-view='article'] .article-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  body[data-view='article'] main > .tabs > button {
    padding-inline: 17px;
    font-size: 13px;
  }
  body[data-view='article'] .article-prices .stat small {
    white-space: normal;
    min-height: 32px;
    line-height: 1.3;
  }
}
@media (max-width: 800px) {
  body[data-view='article'] .article-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.purchase-extra-lines,
.purchase-receipt-lines {
  grid-column: 1/-1;
  display: grid;
  gap: 12px;
}
.purchase-extra-lines fieldset {
  border: 1px solid var(--line);
  border-radius: 7px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 10px 0;
  padding: 12px;
}
.purchase-extra-lines legend {
  font-weight: 600;
  color: var(--navy);
}
.purchase-extra-lines fieldset > .btn {
  grid-column: 1/-1;
  justify-self: end;
}
.purchase-receipt-lines > label {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
}
.purchase-receipt-lines small {
  display: block;
}
.purchase-extra-lines label {
  min-width: 0;
}
@media (max-width: 800px) {
  .purchase-extra-lines fieldset {
    grid-template-columns: 1fr;
  }
}

.purchase-order-total {
  display: block;
  text-align: right;
  font-size: 18px;
  font-weight: 600;
  padding: 12px;
  background: #f5f8ff;
  border: 1px solid var(--line);
  border-radius: 6px;
}
.purchase-extra-lines [hidden] {
  display: none;
}
@media (max-width: 1450px) {
  body[data-view='purchase'] .summary-stats {
    grid-auto-flow: row;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  body[data-view='purchase'] .record-heading {
    display: block;
  }
  body[data-view='purchase'] .record-heading > .record-metadata {
    display: flex;
    max-width: none;
    margin: 8px 16px 8px 0;
    text-align: right;
  }
}
.site-overview-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.site-people-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.site-text {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.site-person {
  align-items: flex-start;
}
.site-person > div {
  min-width: 0;
}
.site-person p {
  margin: 4px 0;
  overflow-wrap: anywhere;
}
.site-contact-name {
  font-weight: 600;
}
.site-contact-picker {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  max-height: 220px;
  overflow: auto;
}
.site-contact-picker label {
  display: flex;
  align-items: center;
  gap: 8px;
}
.site-contact-picker input {
  width: auto;
}
.site-overview-grid .card-body h3 {
  margin: 0 0 10px;
}
.site-overview-grid .card-body h3:not(:first-child) {
  margin-top: 22px;
}
.site-access {
  border-top: 1px solid var(--line);
}
body[data-view='site'] .record-heading {
  flex-wrap: wrap;
  gap: 6px;
}
body[data-view='site'] .record-heading > small {
  max-width: 300px;
}
body[data-view='site'] .tabs {
  margin: 18px 0 16px;
}
@media (min-width: 1201px) and (max-width: 1550px) {
  body[data-view='site'] {
    --dossier: 155px;
    --right: 280px;
  }
  body[data-view='site'] .project-hero {
    grid-template-columns: 150px minmax(145px, 1fr) minmax(280px, 1.5fr);
    gap: 12px;
  }
  body[data-view='site'] .hero-metrics .stat strong {
    font-size: 17px;
    white-space: normal;
  }
  body[data-view='site'] .site-overview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  body[data-view='site'] .record-heading > small {
    max-width: none;
    text-align: left;
  }
}
@media (max-width: 800px) {
  .site-overview-grid,
  .site-people-grid {
    grid-template-columns: 1fr;
  }
}
.project-photo-button {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  border-radius: 6px;
  overflow: hidden;
}
.project-photo-button > .photo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.project-photo-button .photo-enlarge {
  position: absolute;
  right: 6px;
  bottom: 6px;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: #435baa;
}
.project-photo-button .photo-enlarge .icon {
  width: 16px;
  height: 16px;
}
.project-photo-button:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 2px;
}
.hero-photo .project-photo-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: #f5f7fb;
  color: var(--muted);
}
.hero-photo .project-photo-empty > .icon {
  width: 38px;
  height: 38px;
}
.project-photo-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 160px;
  background: #f5f7fb;
  border: 1px solid var(--line);
  border-radius: 6px;
  margin-bottom: 16px;
  overflow: hidden;
}
.project-photo-preview > .photo {
  width: 100%;
  height: 360px;
  object-fit: contain;
}
.project-photo-preview > .project-photo-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  height: 180px;
}
.project-photo-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  max-height: 390px;
  overflow: auto;
}
.project-photo-options .project-photo-choice {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px;
  min-width: 0;
}
.project-photo-choice:has(input:checked) {
  border-color: var(--orange);
  background: #fff5ef;
}
.project-photo-choice input {
  flex: none;
  width: 16px;
  margin: 3px 0;
}
.project-photo-choice > span {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
  width: 100%;
}
.project-photo-choice img,
.project-photo-choice .photo {
  width: 100%;
  height: 90px;
  object-fit: cover;
  border-radius: 4px;
}
.project-photo-choice strong {
  font-weight: 500;
  overflow-wrap: anywhere;
}
@media (max-width: 600px) {
  .project-photo-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.delivery-summary {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 14px;
  margin-bottom: 16px;
}
.delivery-text {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
body[data-view='delivery'] main > .card {
  margin-bottom: 14px;
}
body[data-view='delivery'] .record-heading {
  flex-wrap: wrap;
  gap: 6px;
}
.delivery-line-editor {
  display: grid;
  grid-template-columns: minmax(170px, 1fr) 95px 65px auto;
  gap: 10px;
  align-items: end;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.delivery-line-editor label {
  min-width: 0;
}
.delivery-line-editor input {
  width: 100%;
  min-width: 0;
}
.delivery-line-editor input[readonly] {
  background: #f4f7fc;
}
.delivery-line-editor button {
  margin-bottom: 1px;
}
@media (max-width: 1450px) {
  body[data-view='delivery'] .record-heading > .record-metadata {
    max-width: none;
    text-align: left;
  }
  .delivery-summary {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 600px) {
  .delivery-line-editor {
    grid-template-columns: 1fr 1fr;
  }
  .delivery-line-editor label:first-child {
    grid-column: 1/-1;
  }
}

[data-action='delivery-add-line'][hidden] {
  display: none;
}

.delivery-stock-form fieldset {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 14px;
  margin: 14px 0;
}
.delivery-stock-form legend {
  font-weight: 600;
  padding: 0 6px;
  max-width: 100%;
  overflow-wrap: anywhere;
}
.delivery-stock-form > p {
  line-height: 1.5;
}
.delivery-stock-depots > label {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 120px;
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.delivery-stock-depots small {
  display: block;
  font-size: 12px;
  margin-top: 4px;
}
.delivery-stock-balance {
  font-weight: 600;
  margin-top: 10px;
}
.delivery-stock-form [data-stock-allocation] {
  margin-top: 12px;
}

.invoice-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 14px 0;
}
body[data-view='invoice'] main > .card {
  margin: 14px 0;
}
body[data-view='invoice'] .record-heading {
  flex-wrap: wrap;
}
body[data-view='invoice'] .record-metadata {
  margin-bottom: 8px;
}
@media (max-width: 1450px) {
  .invoice-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Calendar cards retain their own actions and every saved assignment. */
.calendar-event .calendar-people {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex: 0 0 auto;
  overflow: visible;
  margin-left: auto;
  padding-left: 3px;
}
.calendar-people > .avatar {
  width: 27px;
  height: 27px;
  border: 2px solid white;
  margin: 0 0 0 -5px;
  font-size: 10px;
  border-radius: 50%;
}
.calendar-people-more {
  display: grid !important;
  place-items: center;
  width: 27px;
  height: 27px;
  border-radius: 50%;
  margin-left: 2px;
  background: #ffffff70;
  font-size: 11px !important;
}
.calendar-event[data-segment-days='1'] {
  padding: 7px 6px;
  gap: 5px;
}
.calendar-event[data-segment-days='1'] > .icon {
  display: none;
}
.calendar-event[data-segment-days='1'] {
  position: relative;
  display: block;
  padding: 5px 6px;
}
.calendar-event[data-segment-days='1'] > span:not(.calendar-people) {
  display: block;
  width: 100%;
  min-width: 0;
}
.calendar-event[data-segment-days='1'] > span:not(.calendar-people) > b {
  display: -webkit-box;
  width: 100%;
  font-size: 11px;
  line-height: 15px;
  min-height: 30px;
  white-space: normal;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow-wrap: anywhere;
}
.calendar-event[data-segment-days='1'] > span:not(.calendar-people) > small {
  display: none;
}
.calendar-event[data-segment-days='1']:has(.calendar-people) > span:not(.calendar-people) > b {
  padding-right: 38px;
}
.calendar-event[data-segment-days='1'] > .calendar-people {
  position: absolute;
  right: 5px;
  bottom: 5px;
  padding: 0;
}
.calendar-event[data-segment-days='1'] .calendar-people > .avatar {
  width: 19px;
  height: 19px;
  border-width: 1px;
  font-size: 9px;
}
.calendar-event[data-segment-days='1'] .calendar-people-more {
  width: 19px;
  height: 19px;
  font-size: 9px !important;
}
.calendar-event.gray {
  background: #eceef2;
  color: #68758e;
}
.gantt-row {
  height: 25px;
}
.gantt-row > .gantt-label {
  padding-block: 3px;
}
.gantt-row.milestone-row {
  height: 26px;
}
.gantt-row.group-row .gantt-label > b {
  display: flex;
  align-items: center;
  gap: 3px;
}
.gantt-row.group-row .gantt-label .icon {
  width: 11px;
  height: 11px;
  transform: rotate(90deg);
}
.gantt-row.group-row .gantt-label[aria-expanded='false'] .icon {
  transform: none;
}
.gantt-row.group-row .gantt-label:hover {
  background: #eaf0f8;
}
.gantt-row.group-row .gantt-label:focus-visible,
.gantt-row > .gantt-label:focus-visible {
  outline: 2px solid #577ddb;
  outline-offset: -2px;
}
.gantt-legend {
  margin-top: 10px;
  padding: 8px 10px;
}
.gantt-inline-milestones {
  position: absolute;
  left: var(--label);
  right: 0;
  top: 0;
  bottom: 0;
  pointer-events: none;
  z-index: 4;
}
.gantt-milestone {
  height: 25px;
  width: 16px;
  transform: translateX(-50%);
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
}
.gantt-milestone > span {
  width: 11px;
  height: 11px;
  border: 1.5px solid var(--orange);
  transform: rotate(45deg);
  background: white;
  flex: none;
}
.gantt-milestone.done > span {
  border-color: var(--green);
  background: #dff9ed;
}
.gantt-milestone > small {
  position: absolute;
  left: 17px;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: #fffffff0;
  border-radius: 3px;
  padding: 1px 3px;
  font-size: 10px;
  font-weight: 400;
  color: var(--muted);
}
.gantt-milestone.milestone-label-left > small {
  left: auto;
  right: 17px;
}
.gantt-milestone:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}
.gantt-inline-milestones,
.milestone-row > .gantt-timeline {
  container-type: inline-size;
}
.gantt-milestone > small {
  left: calc(8px + 100cqw * var(--marker-offset));
  max-width: max(0px, min(140px, calc(100cqw * var(--marker-space) - 8px)));
}
.gantt-milestone.milestone-label-left > small {
  left: auto;
  right: calc(8px + 100cqw * var(--marker-offset));
}
.gantt-milestone.milestone-label-hidden > small {
  display: none;
}
.calendar-backlog > article {
  display: grid;
  grid-template-columns: 10px 76px minmax(0, 1fr);
  gap: 8px;
  position: relative;
  align-items: start;
}
.calendar-backlog > article > .calendar-grip {
  grid-column: 1;
  align-self: center;
  margin: 0;
}
.calendar-backlog > article > .calendar-backlog-photo {
  display: block;
  grid-column: 2;
}
.calendar-backlog .calendar-backlog-photo > .photo {
  width: 76px !important;
  height: 85px !important;
}
.calendar-backlog > article > .calendar-backlog-copy {
  display: block;
  grid-column: 3;
  min-width: 0;
}
.calendar-backlog-copy > h3 {
  padding-right: 8px;
  line-height: 1.3;
}
.calendar-backlog-copy > p {
  color: var(--muted);
  line-height: 1.3;
  margin: 6px 0 8px;
}
.calendar-backlog > article:first-of-type {
  margin-top: 5px;
}
.calendar-backlog-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 8px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.3;
}
.calendar-backlog-metrics > span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.calendar-backlog-metrics .icon {
  width: 13px;
  height: 13px;
}
.calendar-backlog article .calendar-backlog-copy > .btn {
  min-width: 0;
  width: 100%;
  padding: 7px 4px;
  margin-top: 8px;
}
.calendar-backlog article > .calendar-backlog-menu {
  position: absolute;
  right: 3px;
  top: 3px;
  min-width: 0;
  width: 20px;
  height: 24px;
  min-height: 0;
  border: 0;
  padding: 0;
  margin: 0;
  background: transparent;
}
.calendar-backlog-menu > .icon {
  width: 15px;
  height: 15px;
  transform: rotate(90deg);
}
.calendar-participant-picker {
  grid-column: 1/-1;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px;
  min-width: 0;
}
.calendar-participant-picker legend {
  font-weight: 600;
  padding: 0 4px;
}
.calendar-participant-picker > p {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 13px;
}
.calendar-participant-picker > div {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  max-height: 200px;
  overflow: auto;
}
.calendar-participant-picker label {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
}
.calendar-participant-picker input {
  width: 16px;
  flex: none;
}
.batch-task-selection,
.batch-task-fields {
  grid-column: 1/-1;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 12px;
  min-width: 0;
}
.batch-task-selection legend,
.batch-task-fields legend {
  font-weight: 600;
  padding-inline: 4px;
}
.batch-task-selection > div {
  max-height: 220px;
  overflow: auto;
  margin-top: 10px;
  display: grid;
  gap: 9px;
}
.batch-task-selection label,
.batch-task-fields > div > label:first-child {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
}
.batch-task-selection input,
.batch-task-fields input[type='checkbox'] {
  width: 16px;
  height: 16px;
  flex: none;
}
.batch-task-selection label > span {
  min-width: 0;
  overflow-wrap: anywhere;
}
.batch-task-selection small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}
.batch-task-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.batch-task-fields > div {
  display: grid;
  gap: 8px;
  min-width: 0;
}
.batch-task-fields select,
.batch-task-fields input:not([type='checkbox']) {
  min-width: 0;
  width: 100%;
}
.task-template-table {
  max-height: 310px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
  margin-top: 10px;
}
.task-template-table .data-table {
  width: 100%;
  table-layout: fixed;
}
.task-template-table th {
  position: sticky;
  top: 0;
  background: #f6f8fc;
}
.task-template-table td {
  white-space: normal;
  overflow-wrap: anywhere;
  padding: 9px;
}
.task-template-table th:nth-child(3) {
  width: 65px;
}
.task-board [data-drop-task='En revue'] > .kanban-heading {
  background: linear-gradient(100deg, #eee5ff, #f8f4ff);
}
.task-board [data-drop-task='En revue'] > .kanban-heading h2 {
  color: #6834f7;
}
.quick-actions [data-action='deactivate-tasks'] {
  color: #ff392e;
  background: #fff4f0;
}
.task-activation-selection > div {
  max-height: 350px;
}
.inactive-task-notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f7f8fc;
  margin-bottom: 10px;
  color: var(--muted);
}
@media (max-width: 650px) {
  .batch-task-fields {
    grid-template-columns: 1fr;
  }
}
body[data-view='calendar'] main > .page-heading h1 {
  font-size: 34px;
}
body[data-view='calendar'] main > .page-heading [data-action='toggle-favorite'] {
  display: none;
}
body[data-view='calendar'] .calendar-controls {
  margin: 18px 0 10px;
}
body[data-view='calendar'] .mini-calendar > div > button {
  padding: 4px 0;
}
body[data-view='calendar'] .calendar-legend {
  gap: 8px;
  padding-bottom: 14px;
}
body[data-view='calendar'] .quick-actions > .quick:nth-child(-n + 2) {
  background: #fff0e8;
  color: var(--orange);
  border-color: #fff0e8;
}
body[data-view='calendar'] .quick-actions > .quick:nth-child(3) {
  background: #f5efff;
  color: var(--purple);
  border-color: #f5efff;
}
body[data-view='calendar'] .quick-actions > .quick:nth-child(-n + 3) .quick-arrow {
  display: none;
}
@media (min-width: 1201px) {
  body[data-view='calendar'] main {
    padding-top: 20px;
  }
}
/* Planning reference: keep the chantier location and its four summary fields visible. */
.hero-card.project-hero.planning-hero {
  height: auto;
  min-height: 164px;
  grid-template-columns: 190px minmax(180px, 1fr) minmax(310px, 1.45fr);
  gap: 16px;
  padding: 10px;
}
.hero-card.project-hero.planning-hero .hero-photo {
  height: 144px;
}
.hero-card.project-hero.planning-hero .hero-info {
  height: auto;
  min-height: 0;
  gap: 8px;
  justify-content: space-between;
}
.hero-card.project-hero.planning-hero .hero-person:nth-child(2) {
  display: flex;
}
.hero-card.project-hero.planning-hero .hero-description {
  font-size: 12px;
  line-height: 1.3;
}
.hero-card.project-hero.planning-hero .hero-metrics {
  height: auto;
  grid-template-rows: repeat(2, minmax(0, 1fr));
}
.hero-card.project-hero.planning-hero .stat {
  min-width: 0;
  gap: 9px;
  padding: 7px;
}
.hero-card.project-hero.planning-hero .stat > div {
  min-width: 0;
}
.hero-card.project-hero.planning-hero .stat > div > span {
  display: block;
  font-size: 11px;
}
.hero-card.project-hero.planning-hero .stat strong {
  font-size: 18px;
  white-space: normal;
}
.hero-card.project-hero.planning-hero .stat .badge {
  font-size: 14px;
  font-weight: 400;
}
.hero-card.project-hero.planning-hero .stat:nth-child(4) > .stat-icon {
  color: var(--orange);
}
@media (min-width: 1201px) and (max-width: 1400px) {
  .hero-card.project-hero.planning-hero {
    grid-template-columns: 155px minmax(160px, 1fr) minmax(285px, 1.4fr);
    gap: 12px;
  }
  .hero-card.project-hero.planning-hero .stat strong {
    font-size: 16px;
  }
}
@media (max-width: 1200px) {
  .hero-card.project-hero.planning-hero {
    grid-template-columns: 160px minmax(0, 1fr);
  }
  .hero-card.project-hero.planning-hero .hero-metrics {
    grid-column: 1/-1;
  }
}
.hero-card.project-hero.planning-hero .hero-person small {
  font-size: 13px;
  line-height: 18px;
  display: block;
}
.hero-card.project-hero.planning-hero .hero-person strong {
  font-size: 16px;
  line-height: 20px;
}
@media (min-width: 1201px) {
  body[data-view='gantt'] main > .record-heading {
    margin-bottom: 2px;
  }
  body[data-view='gantt'] main > .tabs {
    margin-top: 8px;
    margin-bottom: 10px;
  }
}
.hero-card.project-hero.planning-hero .stat {
  padding-block: 5px;
}
/* Each dossier exposes its own actions, as in the reference matrix. */
.flow-head {
  grid-template-columns: 200px repeat(9, minmax(77px, 1fr)) 24px;
}
.flow-row-menu.btn {
  min-width: 0;
  width: 24px;
  height: 32px;
  padding: 3px;
  border: 0;
  background: transparent;
  justify-self: center;
}
.flow-row-menu.btn > .icon {
  width: 18px;
  height: 18px;
  transform: rotate(90deg);
}
.flow-row-menu.btn:hover {
  background: #fff0e8;
  color: var(--orange);
}
.flow-project-menu > p {
  margin: 0 0 16px;
  color: var(--navy);
  line-height: 1.5;
}
.flow-project-menu > p > small {
  display: block;
  color: var(--muted);
}
.flow-project-menu .menu-list {
  display: grid;
  gap: 7px;
}
.flow-project-menu .menu-list > .btn {
  justify-content: flex-start;
  text-align: left;
}
.flow-project h3 {
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.flow-row-menu.btn > .icon {
  stroke-width: 2.5;
  color: var(--blue);
}
.followup-scope {
  font-size: 12px;
  line-height: 1.4;
  color: var(--muted);
  padding: 2px 8px;
  overflow-wrap: anywhere;
}
.followup-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 12px;
  border-top: 1px solid var(--line);
}
.followup-row > input {
  flex: none;
  width: 15px;
  height: 15px;
  margin-top: 3px;
  accent-color: var(--green);
}
.followup-row > button {
  border: 0;
  background: none;
  padding: 0;
  min-width: 0;
  flex: 1;
  text-align: left;
  color: var(--navy);
}
.followup-row strong,
.followup-project-task strong {
  display: block;
  font-size: 13px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.followup-row small,
.followup-project-task small {
  display: block;
  font-size: 11px;
  line-height: 1.4;
  color: var(--muted);
  margin-top: 3px;
}
.followup-row > button > span {
  display: block;
  color: var(--blue);
  font-size: 12px;
  line-height: 1.35;
  margin-top: 5px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.followup-row.done strong {
  text-decoration: line-through;
  color: var(--muted);
}
.followup-project-task {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  width: 100%;
  padding: 10px 12px;
  background: white;
  border: 0;
  border-top: 1px solid var(--line);
  text-align: left;
}
.followup-project-task > .icon {
  width: 16px;
  flex: none;
  color: var(--blue);
  margin-top: 2px;
}
.followup-project-task > span {
  min-width: 0;
}
.followup-project-task .badge {
  margin-top: 5px;
  font-size: 10px;
}
.followup-row > button:hover strong,
.followup-project-task:hover strong {
  color: var(--orange);
}
.record-history-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 9px 12px;
  border-top: 1px solid var(--line);
}
.record-history-row > .icon {
  width: 16px;
  flex: none;
  color: var(--muted);
  margin-top: 2px;
}
.record-history-row > div {
  min-width: 0;
}
.record-history-row strong,
.record-history-row small {
  display: block;
  overflow-wrap: anywhere;
}
.record-history-row strong {
  font-size: 12px;
  line-height: 1.35;
}
.record-history-row small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}
.right-panel:has([data-right='tasks'][aria-selected='true']) {
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.right-panel:has([data-right='tasks'][aria-selected='true']) .right-tabs {
  flex-shrink: 0;
}
.right-panel:has([data-right='tasks'][aria-selected='true']) #right-content {
  min-height: 0;
  overflow-y: auto;
  align-content: start;
  scrollbar-width: thin;
}
.right-panel:has([data-right='tasks'][aria-selected='true']) #right-content > * {
  flex-shrink: 0;
}
.commercial-statistics {
  flex-shrink: 0;
}
.right-panel .commercial-metrics > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 31px;
  padding: 5px 0;
}
.right-panel .commercial-metrics dt {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  min-width: 0;
}
.commercial-metrics dt > .icon {
  width: 20px;
  height: 20px;
  flex: none;
}
.right-panel .commercial-metrics dd {
  font-size: 15px;
  text-align: right;
  white-space: nowrap;
}
.commercial-metrics dd > small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.3;
  margin-top: 2px;
  white-space: normal;
}
body[data-view='quote'] .quote-totals > .stat:nth-child(2) > div {
  display: grid;
  grid-template-columns: 1fr auto;
  column-gap: 10px;
  row-gap: 6px;
  align-items: baseline;
  width: 100%;
}
body[data-view='quote'] .quote-totals > .stat:nth-child(2) > div > small {
  grid-column: 1/-1;
  color: #009d78;
}
body[data-view='quote'] .quote-totals > .stat:nth-child(2) > div > span {
  color: #009d78;
  font-size: 14px;
  white-space: nowrap;
}
body[data-view='quote'] .summary-stats .stat-icon.blue {
  color: var(--blue);
}
body[data-view='quote'] .summary-stats .stat-icon.green {
  color: var(--green);
}
.commercial-metrics dt > .icon.orange {
  color: var(--orange);
}
.commercial-metrics dt > .icon.blue {
  color: var(--blue);
}
body[data-view='quote'] .quote-totals > .stat:nth-child(2) > div:has(strong .red) > span {
  color: #ff2929;
}
.right-panel .commercial-statistics .card-heading {
  padding: 4px 12px;
  min-height: 38px;
}
.right-panel .commercial-metrics > div {
  min-height: 30px;
  padding: 4px 0;
}
.notification:not(.has-unread):after {
  display: none;
}
.notification-context {
  color: var(--muted);
  font-size: 13px;
  margin: 0 0 12px;
}
.notification-toolbar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.notification-toolbar [aria-pressed='true'] {
  background: #fff0e9;
  color: #ff4d21;
  border-color: #ffbca5;
}
.notification-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  padding: 14px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  margin-bottom: 8px;
  position: relative;
}
.notification-row.unread {
  background: #fff9f6;
  border-left: 3px solid #ff4d21;
}
.notification-row p {
  margin: 4px 0;
  overflow-wrap: anywhere;
}
.notification-row strong {
  overflow-wrap: anywhere;
}
.notification-row small {
  color: var(--muted);
  font-size: 12px;
}
.notification-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: stretch;
  justify-content: center;
}
.notification-actions .btn {
  font-size: 12px;
}
@media (max-width: 600px) {
  .notification-row {
    grid-template-columns: 1fr;
  }
  .notification-actions {
    flex-direction: row;
    flex-wrap: wrap;
  }
}
/* Détails des références Contact / Article : pictogrammes et densité. */
body[data-view='contact'] .contact-tags {
  margin-top: 4px;
}
body[data-view='contact'] .contact-tags > .badge {
  padding: 7px 12px;
  min-height: 32px;
  gap: 6px;
}
body[data-view='contact'] .contact-grid .card-heading h2 {
  gap: 12px;
}
body[data-view='contact'] .company-row {
  padding-top: 3px;
  padding-bottom: 5px;
}
body[data-view='contact'] .company-row h3 {
  font-size: 18px;
}
body[data-view='contact'] .company-heading-actions [data-action='company-detail'] > .icon {
  order: 2;
}
body[data-view='contact'] .contact-statistics dd {
  font-size: 16px;
}
body[data-view='article'] .article-summary > .stat:nth-child(1) .stat-icon {
  color: #ff7800;
}
body[data-view='article'] .article-summary > .stat:nth-child(2) .stat-icon {
  color: var(--blue);
}
body[data-view='article'] .article-summary > .stat:nth-child(5) .stat-icon {
  color: var(--green);
}
body[data-view='article'] .article-summary > .stat:nth-child(6) .stat-icon {
  color: var(--purple);
}
body[data-view='article'] .margin-note {
  margin-top: 24px;
  min-height: 80px;
}
.quote-template-summary {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px;
  background: #f8faff;
}
.quote-template-summary .details {
  padding: 4px 0;
  margin: 5px 0;
}
.quote-template-summary p {
  font-size: 13px;
  color: var(--muted);
  margin-top: 8px;
}
.activity-participant-picker {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 12px;
  max-height: 300px;
  overflow-y: auto;
}
.activity-participant-picker > label {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}
.activity-participant-picker > label[hidden] {
  display: none;
}
.activity-participant-picker input {
  width: 16px;
  height: 16px;
  flex: none;
}
.activity-participant-picker small {
  display: block;
  color: var(--muted);
  margin-top: 3px;
}
.activity-participant-details summary {
  cursor: pointer;
  color: var(--blue);
  padding: 8px 0;
}
.activity-participant-details > label,
.activity-participant-details > p {
  margin-bottom: 10px;
}
.activity-document-picker {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 12px;
  max-height: 220px;
  overflow: auto;
}
.activity-document-picker > label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
}
.activity-document-picker input {
  width: 16px;
  height: 16px;
  flex: none;
}
.commercial-action-details {
  display: flex !important;
  flex-wrap: wrap;
  gap: 5px 8px;
  margin-top: 6px;
  white-space: normal !important;
  overflow: visible !important;
}
.commercial-action-details > .badge {
  font-size: 10px;
}
.commercial-action-details > small,
.commercial-action-details > span {
  flex-basis: 100%;
  white-space: normal !important;
  overflow-wrap: anywhere;
  color: var(--muted);
}
.topbar .company-name {
  display: block;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.topbar .company > .icon {
  flex: none;
}
.context-help h3 {
  font-size: 20px;
  margin-bottom: 14px;
}
.help-steps {
  padding-left: 24px;
  display: grid;
  gap: 18px;
  line-height: 1.5;
}
.help-steps li::marker {
  color: var(--orange);
  font-weight: 700;
}
.help-steps p {
  margin-top: 4px;
  color: var(--muted);
}
.help-shortcut {
  margin-top: 20px;
  padding: 14px;
  background: #f6f8ff;
  border: 1px solid var(--line);
  border-radius: 6px;
}
.help-shortcut p {
  margin: 5px 0 10px;
}
.help-shortcut kbd {
  background: white;
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 1px 5px;
}
.help-demo {
  margin-top: 16px;
  font-size: 12px;
  color: var(--muted);
}
.settings-hub > .details {
  padding: 0 0 16px;
}
.mfg-progress-card > .card-heading {
  gap: 8px;
}
.mfg-progress-card > .card-heading select {
  width: 99px;
  min-width: 0;
  height: 32px;
  padding: 4px 6px;
  font-size: 13px;
  color: var(--blue);
}
.mfg-progress-card .stock-total strong {
  font-size: 20px;
}
.mfg-progress-card .stock-total {
  align-items: center;
  margin-bottom: 10px;
}
.mfg-progress-counts dt {
  display: flex;
  align-items: center;
  gap: 10px;
}
.mfg-progress-counts dt i {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  flex: none;
  background: currentColor;
}
.mfg-progress-counts dt i.green {
  color: #20cc92;
}
.mfg-progress-counts dt i.blue {
  color: #438fff;
}
.mfg-progress-counts dt i.yellow {
  color: #ffc43b;
}
.mfg-progress-caption {
  color: var(--muted);
  font-size: 12px;
  padding: 0 14px 10px;
}
.mfg-progress-items {
  max-height: 250px;
  overflow-y: auto;
  padding: 0 14px 8px;
}
.mfg-progress-items > button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  padding: 9px 0;
  text-align: left;
  color: var(--ink);
  background: white;
  font-size: 13px;
}
.mfg-progress-items > button:hover {
  background: #f5f8ff;
}
.mfg-progress-items > button > .badge {
  flex: none;
  font-size: 11px;
  padding: 4px 8px;
}
.mfg-progress-items > [data-progress-component] {
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 6px;
  font-size: 13px;
}
.mfg-progress-items > [data-progress-component] > span:not(.meter) {
  color: var(--muted);
}
.mfg-progress-link {
  padding: 4px 14px 12px;
}
body[data-view='manufacturing']
  .quick-actions
  [data-action='start-manufacturing']
  > .icon:first-child {
  color: var(--green);
}
body[data-view='opportunity'] .avatar-group [data-action='activity-participants'] {
  border-radius: 50%;
  width: 30px;
  height: 30px;
  min-width: 30px;
  padding: 3px;
  background: #f5f7fc;
}
body[data-view='opportunity'] .avatar-group > a {
  display: flex;
  border-radius: 50%;
}
body[data-view='opportunity'] .tag-chip:first-child {
  background: #fff4d9;
  color: #866121;
}
/* Task summary and project context follow the supplied compact reference cards. */
@media (min-width: 1201px) {
  .hero-card.project-hero.planning-hero.tasks-hero {
    height: 140px;
    min-height: 140px;
    grid-template-columns: 180px minmax(195px, 1fr) minmax(335px, 1.4fr);
    gap: 14px;
  }
  .hero-card.project-hero.tasks-hero .hero-photo {
    height: 120px;
  }
  .hero-card.project-hero.tasks-hero .hero-info {
    gap: 4px;
  }
  .hero-card.project-hero.tasks-hero .hero-person {
    gap: 8px;
  }
  .hero-card.project-hero.tasks-hero .hero-person small {
    display: none;
  }
  .hero-card.project-hero.tasks-hero .hero-person strong {
    font-size: 14px;
    line-height: 18px;
  }
  .hero-card.project-hero.tasks-hero .hero-person > .icon {
    width: 19px;
    height: 19px;
  }
  .hero-card.project-hero.tasks-hero .hero-description {
    font-size: 12px;
    line-height: 16px;
  }
  .hero-card.project-hero.tasks-hero .stat strong {
    font-size: 18px;
  }
}
@media (min-width: 1201px) and (max-width: 1400px) {
  .hero-card.project-hero.planning-hero.tasks-hero {
    grid-template-columns: 150px minmax(190px, 1fr) minmax(280px, 1.4fr);
    gap: 10px;
  }
  .hero-card.project-hero.tasks-hero .stat strong {
    font-size: 16px;
  }
  .hero-card.project-hero.tasks-hero .hero-description {
    font-size: 11px;
    line-height: 14px;
  }
}
.resource-load-card .card-heading {
  gap: 7px;
}
.resource-load-card .card-heading h2 {
  font-size: 14px;
  gap: 7px;
  white-space: nowrap;
}
.resource-load-card .card-heading h2 > .icon {
  width: 19px;
  height: 19px;
}
.resource-load-card .card-heading > .btn {
  padding: 5px 8px;
  flex: none;
}
.resource-load {
  gap: 15px;
}
.resource-load > div {
  gap: 10px;
}
.resource-load > div > div {
  min-width: 0;
}
.resource-load p {
  gap: 8px;
  margin-bottom: 4px;
  font-size: 13px;
}
.resource-load p > b {
  color: var(--navy);
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.resource-load p > span {
  flex: none;
}
.resource-load .resource-role {
  margin-bottom: 5px;
}
.resource-load .resource-role small {
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.resource-load [data-resource-percent] {
  font-weight: 500;
}
.resource-load [data-resource-percent].orange {
  color: var(--orange);
}
.resource-load > small,
.resource-load .resource-unassigned {
  font-size: 11px;
  line-height: 16px;
  color: var(--muted);
}
.resource-load-planning p > b {
  font-weight: 400;
}
.resource-load-planning .resource-role {
  display: none;
}
.project-history-compact.activity-row {
  padding: 6px 12px;
  gap: 9px;
  align-items: flex-start;
  min-height: 45px;
}
.project-history-compact > .avatar {
  width: 31px;
  height: 31px;
  flex: none;
}
.project-history-compact > div {
  min-width: 0;
}
.project-history-compact header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 7px;
}
.project-history-compact h3 {
  font-size: 13px;
  line-height: 17px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.project-history-compact header > small {
  font-size: 11px;
  flex: none;
  white-space: nowrap;
  color: var(--muted);
}
.project-history-compact p {
  font-size: 12px;
  line-height: 16px;
  margin-top: 3px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.project-history-compact > .btn {
  padding: 3px;
  min-width: 22px;
  flex: none;
}
.task-board [data-drop-task='À planifier'] .kanban-heading {
  color: #9b360e;
}
.task-board [data-drop-task='À attribuer'] .kanban-heading {
  color: #065bff;
}
.task-board [data-drop-task='En cours'] .kanban-heading,
.task-board [data-drop-task='Terminées'] .kanban-heading {
  color: #009c6d;
}
.task-backlog > .card-heading {
  gap: 12px;
  flex-wrap: wrap;
  padding: 8px 10px;
}
.task-backlog > .card-heading h2 {
  font-size: 14px;
}
.task-backlog-hint {
  font-size: 11px;
  line-height: 1.3;
  color: var(--muted);
  margin-left: auto;
  text-align: right;
}
.task-backlog-empty {
  grid-column: 1/-1;
  color: var(--muted);
  font-size: 13px;
  padding: 10px 0;
}
.task-backlog .backlog-task h3 > button {
  overflow-wrap: anywhere;
}
.task-backlog .backlog-task footer {
  flex-wrap: wrap;
}
.task-backlog .backlog-task footer > span:last-child:not(.task-priority) {
  margin-left: auto;
}
@media (min-width: 1201px) {
  .task-backlog .backlog-cards {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
@media (min-width: 1201px) and (max-width: 1400px) {
  .task-board .kanban-heading h2 {
    font-size: 14px;
    gap: 6px;
    white-space: nowrap;
  }
  .task-board .kanban-heading h2 > .icon {
    width: 18px;
    height: 18px;
  }
  .task-board .task-date {
    font-size: 11px;
    gap: 4px;
  }
  .task-board .task-date > span {
    white-space: nowrap;
    gap: 3px;
  }
}
.project-recent-documents .document-list > button {
  padding: 8px 12px;
  min-height: 47px;
  gap: 9px;
}
.project-recent-documents .document-list > button > img {
  width: 30px;
  height: 30px;
  object-fit: cover;
  border-radius: 4px;
  flex: none;
}
.project-recent-documents .document-list > button > span {
  font-size: 13px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.project-recent-documents .document-list > button > span > small {
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.project-recent-documents .document-list > button > small {
  font-size: 11px;
  white-space: nowrap;
  flex: none;
}
.project-status-card .card-heading {
  gap: 6px;
  flex-wrap: wrap;
}
.project-status-card .card-heading h2 {
  font-size: 14px;
  gap: 7px;
}
.project-status-edit {
  margin-left: auto;
  padding: 4px 6px;
  gap: 4px;
}
.project-status-edit > .badge {
  padding: 2px 0;
  background: transparent;
  font-size: 12px;
}
.project-status-edit > .icon {
  width: 13px;
  height: 13px;
}
.project-status-dates {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0;
  padding: 4px 14px 8px;
  color: var(--blue);
  font-size: 13px;
}
.project-status-dates > .icon {
  width: 17px;
  height: 17px;
  flex: none;
}
.project-status-card .details {
  padding-top: 0;
}
.project-status-card .details > div {
  gap: 7px;
  align-items: center;
}
.project-status-card .details dt {
  font-size: 13px;
  flex: none;
  min-width: 0;
}
.project-status-card .details dd {
  font-size: 14px;
  min-width: 0;
  overflow-wrap: anywhere;
}
.project-status-card .details dd small {
  font-size: 12px;
  /* Les indications courtes tiennent sur une ligne ; les formules plus longues
     (taux de marque) doivent pouvoir passer a la ligne dans la carte etroite. */
  white-space: normal;
}
.project-status-progress {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}
.project-status-progress .meter {
  width: 80px;
  max-width: 55%;
  flex: 1;
}
.project-status-progress b {
  white-space: nowrap;
}
.gantt-reference-controls {
  grid-template-columns: minmax(235px, 1.6fr) minmax(0, 3fr);
  gap: 9px;
  margin: 10px 0;
}
.gantt-reference-controls .gantt-period-controls {
  grid-column: 1;
  grid-row: 1;
}
.gantt-reference-controls .gantt-main-filters {
  grid-column: 2;
  grid-row: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  min-width: 0;
}
.gantt-reference-controls .gantt-select-filter {
  display: block;
  position: relative;
  min-width: 0;
  margin: 0;
  padding: 0;
}
.gantt-reference-controls .gantt-select-filter:after {
  content: '';
  position: absolute;
  pointer-events: none;
  right: 12px;
  top: 12px;
  width: 6px;
  height: 6px;
  border-right: 1.5px solid var(--blue);
  border-bottom: 1.5px solid var(--blue);
  transform: rotate(45deg);
}
.gantt-reference-controls .gantt-select-filter select {
  appearance: none;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  height: 34px;
  padding: 6px 24px 6px 10px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background-color: white;
  font-size: 12px;
  color: var(--blue);
  text-overflow: ellipsis;
}
.gantt-reference-controls .gantt-viewport-controls {
  grid-column: 1/-1;
  grid-row: 2;
  display: flex;
  gap: 8px;
  min-width: 0;
}
.gantt-reference-controls .gantt-viewport-controls > .gantt-select-filter {
  width: 136px;
  flex: none;
}
.gantt-reference-controls .gantt-zoom-controls {
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 5px;
  flex: none;
  height: 34px;
}
.gantt-reference-controls .gantt-zoom-controls > .btn {
  border: 0;
  background: transparent;
  padding: 5px;
  width: 28px;
}
.gantt-reference-controls .gantt-zoom-controls > span {
  font-size: 12px;
  white-space: nowrap;
  padding: 0 6px;
}
.gantt-reference-controls .gantt-viewport-controls > .btn {
  height: 34px;
  font-size: 12px;
  padding: 6px 9px;
  flex: none;
}
.gantt-reference-controls [data-action='gantt-more-filters'].has-filters {
  color: var(--orange);
  background: #fff2ed;
  border-color: #ffd8c9;
}
.gantt-reference-controls .gantt-extra-filters {
  grid-column: 1/-1;
  grid-row: 3;
  display: flex;
  gap: 9px;
  padding: 10px;
  background: #f8faff;
  border: 1px solid var(--line);
  border-radius: 5px;
}
.gantt-reference-controls .gantt-extra-filters[hidden] {
  display: none;
}
.gantt-reference-controls .gantt-extra-filters > .gantt-select-filter {
  width: 240px;
  max-width: 50%;
}
@media (max-width: 1200px) {
  .gantt-reference-controls {
    grid-template-columns: 1fr;
  }
  .gantt-reference-controls .gantt-period-controls {
    grid-column: 1;
    grid-row: 1;
  }
  .gantt-reference-controls .gantt-main-filters {
    grid-column: 1;
    grid-row: 2;
  }
  .gantt-reference-controls .gantt-viewport-controls {
    grid-column: 1;
    grid-row: 3;
    flex-wrap: wrap;
  }
  .gantt-reference-controls .gantt-extra-filters {
    grid-column: 1;
    grid-row: 4;
  }
}
:root {
  --red: #ff2929;
}
.quick-action-orange {
  --action-color: var(--orange);
}
.quick-action-purple {
  --action-color: var(--purple);
}
.quick-action-blue {
  --action-color: var(--blue);
}
.quick-action-green {
  --action-color: var(--green);
}
.quick-action-red {
  --action-color: var(--red);
}
.btn.quick > .icon:first-child {
  color: var(--action-color, var(--purple));
}
.quote-list-table .table-sort {
  display: flex;
  gap: 4px;
  justify-content: flex-start;
  padding: 0;
  min-height: 28px;
  width: 100%;
  border: 0;
  background: transparent;
  font-size: 12px;
}
.quote-list-table .table-sort > span {
  min-width: 0;
  white-space: nowrap;
}
.quote-list-table .table-sort > .icon {
  width: 12px;
  height: 15px;
  flex: none;
  color: #8595bd;
  stroke-width: 1.8;
}
.quote-list-table th:is([aria-sort='ascending'], [aria-sort='descending']) .table-sort {
  color: var(--navy);
  font-weight: 600;
}
.quote-list-table th:is([aria-sort='ascending'], [aria-sort='descending']) .table-sort > .icon {
  color: var(--orange);
}
.quote-list-table .table-sort:focus-visible {
  outline-offset: 2px;
}

.quote-row-identity,
.quote-row-history {
  overflow-wrap: anywhere;
}
.quote-row-identity p {
  margin: 6px 0 12px;
}
.quote-row-identity strong {
  margin-left: 10px;
}
.quote-row-notice {
  background: var(--orange-soft, #fff2eb);
  padding: 12px;
  border-radius: 6px;
  margin: 12px 0;
}
.quote-row-menu .menu-list > .btn {
  justify-content: flex-start;
  text-align: left;
}

/* Upcoming activity and next step follow the opportunity reference. */
body[data-view='opportunity'] .opportunity-event {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  column-gap: 10px;
  row-gap: 4px;
  padding: 8px 12px;
}
.opportunity-event .event-kind {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #eef5ff;
  color: #1760ff;
  margin-top: 4px;
}
.opportunity-event .event-kind > .icon {
  width: 20px;
  height: 20px;
}
.opportunity-event .event-content {
  min-width: 0;
}
.opportunity-event .event-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  background: none;
  border: 0;
  padding: 0;
  text-align: left;
  font: inherit;
  color: var(--navy);
  font-weight: 600;
  line-height: 1.3;
  cursor: pointer;
  overflow-wrap: anywhere;
}
.opportunity-event .event-title:hover {
  text-decoration: underline;
}
.opportunity-event .event-title:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}
.opportunity-event p.event-date {
  display: flex;
  flex-wrap: wrap;
  column-gap: 7px;
  row-gap: 2px;
  margin-top: 5px;
  font-size: 12px;
  line-height: 16px;
}
.opportunity-event p.event-date .icon {
  flex: none;
  width: 14px;
  height: 14px;
}
.opportunity-event p.event-date .activity-overdue {
  margin: 0;
  font-size: 10px;
}
.opportunity-event p.event-location {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  font-size: 12px;
  line-height: 17px;
  margin-top: 6px;
}
.opportunity-event .event-location > .icon {
  flex: none;
  width: 14px;
  height: 14px;
  margin-top: 2px;
}
.opportunity-event .event-location > span {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
}
.opportunity-event .event-content > .description {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  white-space: pre-line;
  overflow-wrap: anywhere;
  font-size: 13px;
  line-height: 19px;
  margin: 10px 0;
}
.opportunity-event .avatar-group {
  align-items: center;
  flex-wrap: wrap;
}
body[data-view='opportunity'] .opportunity-event > .toolbar {
  grid-column: 1/-1;
  justify-content: flex-end;
  margin: 0;
}
body[data-view='opportunity'] .next-step > div {
  min-width: 0;
}
body[data-view='opportunity'] .next-step-description {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  white-space: pre-line;
  overflow-wrap: anywhere;
  line-height: 16px;
}
body[data-view='opportunity'] .next-step > .icon,
body[data-view='opportunity'] .next-step > .btn {
  flex-shrink: 0;
}

@media (min-width: 1101px) and (max-width: 1450px) {
  body[data-view='opportunity'] .hero-card {
    height: auto;
    grid-template-columns: 180px minmax(0, 1fr);
    gap: 12px;
  }
  body[data-view='opportunity'] .hero-photo {
    height: 144px;
  }
  body[data-view='opportunity'] .hero-info {
    height: auto;
    min-width: 0;
  }
  body[data-view='opportunity'] .hero-description {
    margin-top: 10px;
    line-height: 1.4;
  }
  body[data-view='opportunity'] .hero-metrics {
    grid-column: 1/-1;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-template-rows: auto;
    border-top: 1px solid var(--line);
  }
  body[data-view='opportunity'] .hero-metrics .stat {
    padding: 10px 8px;
    gap: 7px;
    min-width: 0;
    border-top: 0;
  }
  body[data-view='opportunity'] .hero-metrics .stat > div {
    min-width: 0;
  }
  body[data-view='opportunity'] .hero-metrics .stat strong {
    font-size: 18px;
  }
  body[data-view='opportunity'] .hero-metrics .stat:nth-child(3) strong {
    white-space: nowrap;
  }
  body[data-view='opportunity'] .hero-metrics .stat:last-child strong {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
  }
  body[data-view='opportunity'] main > .grid.three {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  body[data-view='opportunity'] main > .grid.three > .card:first-child {
    grid-column: 1/-1;
  }
  body[data-view='opportunity'] .person-row > div > p {
    margin-top: 2px;
  }
}

body[data-view='opportunity'] .tag-chip:nth-child(4n + 3) {
  background: #dff8ef;
  color: #00866f;
}
@media (max-width: 600px) {
  body[data-view='opportunity'] .hero-metrics {
    height: auto;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: auto;
  }
  body[data-view='opportunity'] .hero-metrics .stat strong {
    white-space: normal;
  }
}

dialog:has(.article-catalogue) {
  width: min(1080px, calc(100vw - 40px));
}
.opportunity-entry-intro {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}
.opportunity-entry-context {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid #dce6fb;
  border-radius: 7px;
  background: #f5f8ff;
  line-height: 1.45;
}
.opportunity-client-picker {
  position: relative;
}
.opportunity-client-picker > small {
  color: var(--muted);
  font-size: 12px;
  margin-top: 5px;
}
.opportunity-client-results {
  display: grid;
  gap: 5px;
  margin-top: 7px;
}
.opportunity-client-choice,
.opportunity-client-create {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: white;
  padding: 8px 10px;
  text-align: left;
  color: var(--navy);
  font: inherit;
  cursor: pointer;
}
.opportunity-client-choice:hover,
.opportunity-client-choice:focus-visible,
.opportunity-client-create:hover,
.opportunity-client-create:focus-visible {
  border-color: #8baeff;
  background: #f6f9ff;
  outline: 0;
}
.opportunity-client-choice strong,
.opportunity-client-choice small,
.opportunity-client-create small {
  display: block;
}
.opportunity-client-choice small,
.opportunity-client-create small {
  color: var(--muted);
  font-size: 12px;
}
.opportunity-client-choice > span:last-child {
  color: var(--blue);
  font-size: 12px;
}
.opportunity-client-create {
  background: #fffaf5;
  color: var(--orange);
}
.opportunity-client-created {
  margin: 0;
  padding: 8px 10px;
  border-radius: 6px;
  background: #eef9f4;
  color: #087c54;
  font-size: 12px;
}
.opportunity-entry-switch {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 4px;
  color: var(--muted);
  font-size: 12px;
}
.opportunity-entry-switch .btn {
  flex: none;
}
@media (max-width: 600px) {
  .opportunity-entry-switch {
    align-items: stretch;
    flex-direction: column;
  }
  .opportunity-entry-switch .btn {
    width: 100%;
    justify-content: center;
  }
}
.opportunity-inline-value {
  display: inline;
  padding: 0;
  border: 0;
  border-bottom: 1px dashed transparent;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: inherit;
  text-align: inherit;
  cursor: pointer;
}
.opportunity-inline-value:hover,
.opportunity-inline-value:focus-visible {
  border-bottom-color: currentColor;
  outline: 0;
}
.opportunity-inline-editor {
  box-sizing: border-box;
  max-width: 100%;
  border: 1px solid #8baeff;
  border-radius: 5px;
  padding: 4px 6px;
  background: white;
  color: var(--navy);
  font: inherit;
  line-height: 1.35;
  box-shadow: 0 0 0 2px #486fff20;
}
.need-text > .opportunity-inline-value {
  display: block;
  width: 100%;
  min-height: 20px;
  text-align: left;
}
.need-text > .opportunity-inline-editor {
  display: block;
  width: 100%;
  resize: vertical;
}
.hero-metrics .opportunity-inline-editor {
  width: 100%;
}
.details .opportunity-inline-editor {
  width: 100%;
  font-weight: 600;
}
.opportunity-tag-add {
  white-space: nowrap;
}
.record-tag-input {
  width: 145px;
  max-width: 100%;
  border: 1px solid #8baeff;
  border-radius: 999px;
  padding: 4px 10px;
  background: white;
  color: var(--navy);
  font: inherit;
  font-size: 12px;
  line-height: 1.3;
  outline: 0;
}
.record-tag-input:focus {
  box-shadow: 0 0 0 2px #486fff20;
}
.article-catalogue .catalogue-filters {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 12px;
}
.article-catalogue .catalogue-filters > label {
  min-width: 0;
}
.article-catalogue .catalogue-count {
  margin: 14px 0 8px;
  font-weight: 600;
  color: var(--navy);
}
.article-catalogue .data-table {
  min-width: 840px;
}
.article-catalogue .data-table td:first-child {
  min-width: 210px;
  max-width: 280px;
  white-space: normal;
  overflow-wrap: anywhere;
}
.article-catalogue .data-table td:first-child small {
  display: block;
  margin-top: 3px;
}
.article-catalogue .catalogue-row-actions {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  min-width: 155px;
}
.article-catalogue .data-table td {
  padding: 10px 8px;
}
@media (max-width: 700px) {
  .article-catalogue .catalogue-filters {
    grid-template-columns: 1fr;
  }
  .article-catalogue .catalogue-row-actions {
    min-width: 130px;
  }
}

.module-directory .directory-controls {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
.module-directory .directory-count {
  margin: 12px 0 6px;
  color: var(--navy);
  font-weight: 600;
}
.module-directory .search-results {
  max-height: 42vh;
  overflow: auto;
  overscroll-behavior: contain;
  margin-top: 0;
}
.module-directory .directory-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: var(--navy);
  background: #fff;
}
.module-directory .directory-row > span:not(.badge):not(.avatar) {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}
.module-directory .directory-row strong {
  font-size: 14px;
  font-weight: 600;
}
.module-directory .directory-row small {
  margin-top: 3px;
  line-height: 1.4;
}
.module-directory .directory-row > .badge {
  flex-shrink: 0;
}
.module-directory [hidden] {
  display: none !important;
}
.module-directory .directory-row:hover {
  background: #f5f8ff;
}
.module-directory .directory-empty {
  padding: 15px;
  color: var(--muted);
}
.module-directory .toolbar {
  margin-bottom: 0;
}
.module-group {
  position: relative;
  width: 100%;
  display: flex;
  justify-content: center;
}
.module-group > button {
  width: 42px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  color: #2f4a9e;
  background: transparent;
  position: relative;
}
.module-group > button.active {
  background: #fff1e9;
  color: var(--orange);
  border-radius: 9px;
}
.module-group .module-chevron {
  position: absolute;
  width: 10px;
  height: 10px;
  right: 1px;
  bottom: 4px;
  transform: rotate(0deg);
  transition: transform 0.15s;
}
.module-group.open .module-chevron {
  transform: rotate(180deg);
}
.module-submenu {
  position: absolute;
  z-index: 20;
  left: calc(100% + 7px);
  top: -6px;
  width: 230px;
  max-height: calc(100vh - 16px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  box-shadow: 0 12px 34px #17285824;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.module-submenu[hidden] {
  display: none;
}
.module-submenu > strong {
  padding: 7px 9px;
  color: var(--navy);
  font-size: 13px;
}
.module-submenu > a {
  padding: 9px 11px;
  border-radius: 6px;
  color: var(--blue);
  font-size: 13px;
  line-height: 1.25;
}
.module-submenu > a:hover,
.module-submenu > a:focus-visible {
  background: #f4f7ff;
  color: var(--navy);
}
.module-submenu > a.active {
  background: #fff1e9;
  color: var(--orange);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}
.modules-expanded .module-group {
  justify-content: flex-start;
}
.modules-expanded .module-group > button {
  width: 100%;
  justify-content: flex-start;
  padding-left: 15px;
  gap: 9px;
}
.modules-expanded .module-group > button:after {
  content: attr(aria-label);
  font-size: 13px;
}
.modules-expanded .module-submenu {
  left: calc(100% + 4px);
}
.crm-pipeline-picker {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  margin-left: auto;
}
.crm-pipeline-picker select {
  min-width: 190px;
}
.crm-kanban .kanban-heading {
  padding-right: 55px;
}
.crm-kanban .collapse-phase {
  left: auto;
  right: 34px;
  top: 10px;
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
  color: var(--muted);
  opacity: 0.72;
  padding: 2px;
  z-index: 2;
}
.crm-kanban .kanban-heading > .btn.square {
  min-width: 18px;
  padding: 0;
}
.crm-kanban .collapse-phase:hover,
.crm-kanban .collapse-phase:focus-visible {
  opacity: 1;
  background: #ffffff73;
}
.crm-kanban .collapse-phase .icon {
  width: 12px;
  height: 12px;
  transform: rotate(90deg);
}
.crm-kanban .kanban-column.collapsed {
  width: 54px;
  min-width: 54px;
  align-self: stretch;
  padding: 0;
  overflow: hidden;
}
.crm-kanban .kanban-column.collapsed .kanban-heading {
  height: 100%;
  min-height: 310px;
  padding: 36px 10px 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-direction: column;
}
.crm-kanban .kanban-column.collapsed .kanban-heading h2 {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  white-space: nowrap;
}
.crm-kanban .kanban-column.collapsed .kanban-heading small,
.crm-kanban .kanban-column.collapsed .kanban-heading strong,
.crm-kanban .kanban-column.collapsed .kanban-heading > .btn.square,
.crm-kanban .kanban-column.collapsed .kanban-phase-body {
  display: none;
}
.crm-kanban .kanban-column.collapsed .collapse-phase {
  left: auto;
  right: 18px;
  top: 9px;
}
.crm-kanban .kanban-column.collapsed .collapse-phase .icon {
  transform: rotate(-90deg);
}
@media (max-width: 900px) {
  .module-submenu {
    width: 205px;
  }
  .crm-pipeline-picker {
    width: 100%;
    margin: 4px 0;
  }
  .crm-pipeline-picker select {
    flex: 1;
    min-width: 0;
  }
}
.crm-suspect-search {
  max-width: 460px;
  margin: 0 0 14px;
}
.suspect-card {
  min-height: 132px;
  cursor: grab;
}
.suspect-card > small {
  display: block;
  color: var(--muted);
  margin: 8px 0;
}
.suspect-card > .btn {
  width: 100%;
  justify-content: center;
  margin-top: 10px;
}
.crm-admin-notice,
.crm-delete-warning {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid #ffd8c7;
  border-radius: 8px;
  background: #fff7f2;
  color: var(--navy);
  margin-bottom: 18px;
}
.crm-admin-notice > .icon,
.crm-delete-warning > .icon {
  color: var(--orange);
  width: 24px;
  height: 24px;
  flex: none;
}
.crm-admin-notice p,
.crm-delete-warning p {
  margin: 0;
  line-height: 1.5;
}
.crm-admin-family {
  margin: 22px 0;
}
.crm-admin-family > header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 12px;
}
.crm-admin-family > header h2 {
  font-size: 21px;
  color: var(--navy);
}
.crm-admin-family > header p {
  color: var(--muted);
  margin-top: 3px;
}
.crm-admin-pipelines {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
  gap: 14px;
}
.crm-admin-pipeline {
  overflow: hidden;
}
.crm-admin-pipeline > .card-heading {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}
.crm-admin-pipeline > .card-heading h3 {
  display: flex;
  gap: 8px;
  align-items: center;
}
.crm-admin-pipeline > .card-heading > div {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.crm-phase-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.crm-phase-list > li {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 11px 13px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}
.crm-phase-list > li > span:nth-child(2) small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}
.crm-phase-list > li > div {
  display: flex;
  gap: 3px;
}
.crm-phase-grip {
  color: #9aa8c1;
  cursor: grab;
  letter-spacing: -3px;
}
.crm-occupied-link {
  grid-column: 2/4;
  justify-self: start;
  border: 0;
  background: none;
  color: var(--orange);
  padding: 0;
  font-size: 12px;
  text-decoration: underline;
}
.crm-admin-pipeline > footer {
  padding: 11px 13px;
}
.contact-organization-access .details {
  margin: 0;
}
.contact-organization-actions {
  margin-top: 14px;
  flex-wrap: wrap;
}
.organization-access-preservation {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}
.crm-commercial-teams {
  scroll-margin-top: 20px;
}
.crm-commercial-team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 14px;
}
.crm-commercial-team .card-heading > div {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.crm-commercial-team .card-body p {
  margin: 0 0 8px;
  overflow-wrap: anywhere;
}
.crm-commercial-team .card-body p:last-child {
  margin-bottom: 0;
}
.governance-summary {
  padding: 16px;
}
.governance-summary > p {
  margin: 0 0 12px;
}
.governance-roles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.governance-roles span,
.governance-milestones > div {
  display: grid;
  gap: 3px;
  padding: 10px;
  border: 1px solid var(--border, #e6ebf5);
  border-radius: 9px;
}
.governance-roles small,
.governance-milestones small {
  color: var(--muted, #667085);
}
.governance-milestones {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}
.governance-milestones > div {
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
}
.governance-role-editor {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.governance-role-editor legend {
  grid-column: 1/-1;
}
@media (max-width: 700px) {
  .governance-roles,
  .governance-role-editor {
    grid-template-columns: 1fr;
  }
  .governance-milestones > div {
    grid-template-columns: auto 1fr;
  }
  .governance-milestones .badge {
    grid-column: 2;
  }
  .affair-governance-grid {
    grid-template-columns: 1fr !important;
  }
}
.governance-partners {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}
.governance-partners span {
  display: grid;
  gap: 3px;
  padding: 10px;
  border: 1px solid var(--border, #e6ebf5);
  border-radius: 9px;
  background: #f8faff;
}
.governance-partners small {
  color: var(--muted, #667085);
}
.governance-partner-editor {
  display: grid;
  gap: 10px;
}
.governance-partner-editor > p {
  margin: 0;
  color: var(--muted, #667085);
}
.governance-partner-row {
  display: grid;
  grid-template-columns: minmax(170px, 1fr) minmax(150px, 1fr) minmax(170px, 1fr);
  gap: 8px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--border, #e6ebf5);
  border-radius: 9px;
}
.governance-partner-row label {
  display: flex;
  align-items: center;
  gap: 8px;
}
@media (max-width: 700px) {
  .governance-partner-row {
    grid-template-columns: 1fr;
  }
}
.commercial-workload-summary {
  padding: 16px;
  display: grid;
  gap: 10px;
}
.commercial-workload-summary > p:first-child {
  display: flex;
  align-items: center;
  gap: 8px;
}
.commercial-workload-summary > div {
  display: grid;
  grid-template-columns: minmax(110px, 0.8fr) minmax(180px, 1.3fr) minmax(140px, 1fr);
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.commercial-workload-summary .meter {
  grid-column: 1/-1;
}
.commercial-action-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  padding: 16px;
}
.commercial-action-summary section > h3 {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.commercial-action-summary section > p {
  display: grid;
  gap: 3px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}
.commercial-action-summary span,
.forecast-load-label {
  color: var(--muted);
  font-size: 12px;
}
.workload-editor {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.calendar-event.calendar-forecast {
  border: 1px dashed currentColor;
  background-image: none;
}
.forecast-load-label {
  display: block;
  margin-top: 5px;
  color: #97651b;
}
@media (max-width: 700px) {
  .affair-planning-grid,
  .commercial-action-summary {
    grid-template-columns: 1fr !important;
  }
  .commercial-workload-summary > div,
  .workload-editor {
    grid-template-columns: 1fr;
  }
  .commercial-workload-summary .meter {
    grid-column: auto;
  }
}
.quote-version-list {
  display: grid;
  gap: 9px;
}
.quote-version-list > div {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 9px 0;
  border-bottom: 1px solid var(--border, #e6ebf5);
}
.quote-version-list > div:last-child {
  border-bottom: 0;
}
.quote-version-list .btn {
  margin-left: auto;
}
.quote-editorial-grid .card-body p {
  overflow-wrap: anywhere;
}
@media (max-width: 700px) {
  .quote-version-grid,
  .quote-editorial-grid {
    grid-template-columns: 1fr !important;
  }
  .quote-version-list .btn {
    margin-left: 0;
  }
}
.crm-admin-pipeline.crm-team-pipeline-focus {
  outline: 3px solid #486fff55;
  box-shadow: 0 0 0 5px #486fff1a;
}
.commercial-team-members {
  border: 1px solid var(--line);
  border-radius: 7px;
  margin: 0;
  padding: 10px 12px;
  max-height: 340px;
  overflow: auto;
}
.commercial-team-members legend {
  padding: 0 5px;
  color: var(--navy);
  font-size: 13px;
}
.commercial-team-members label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 0;
  color: var(--navy);
}
.btn.danger {
  color: #c13d31;
}
@media (max-width: 760px) {
  .crm-admin-family > header {
    align-items: flex-start;
    flex-direction: column;
  }
  .crm-admin-pipelines {
    grid-template-columns: 1fr;
  }
  .crm-phase-list > li {
    grid-template-columns: 18px minmax(0, 1fr);
  }
  .crm-phase-list > li > div {
    grid-column: 2;
    flex-wrap: wrap;
  }
  .crm-occupied-link {
    grid-column: 2;
  }
}
@media (max-width: 760px) {
  .contact-organization-access .details > div {
    grid-template-columns: minmax(110px, 0.8fr) minmax(0, 1.2fr);
  }
  .contact-organization-actions {
    align-items: stretch;
  }
  .contact-organization-actions > .btn {
    width: 100%;
    justify-content: center;
  }
  .crm-commercial-team-grid {
    grid-template-columns: 1fr;
  }
  .crm-commercial-team .card-heading {
    align-items: flex-start;
  }
  .crm-commercial-team .card-heading > div {
    justify-content: flex-start;
  }
}

@media (max-width: 600px) {
  body:is([data-view='project'], [data-view='tasks'], [data-view='gantt']) .hero-card.project-hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    height: auto;
    min-height: 0;
  }
  body:is([data-view='project'], [data-view='tasks'], [data-view='gantt'])
    .project-hero
    .hero-photo {
    height: 180px;
  }
  body:is([data-view='project'], [data-view='tasks'], [data-view='gantt'])
    .project-hero
    .hero-info {
    height: auto;
    min-height: 0;
    gap: 12px;
  }
  body:is([data-view='project'], [data-view='tasks'], [data-view='gantt'])
    .project-hero
    .hero-metrics {
    grid-column: 1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: auto;
    height: auto;
  }
  body:is([data-view='project'], [data-view='tasks'], [data-view='gantt'])
    .project-hero
    .hero-metrics
    > .stat {
    min-height: 74px;
    padding: 8px;
    gap: 7px;
  }
  body:is([data-view='project'], [data-view='tasks'], [data-view='gantt'])
    .project-hero
    .hero-metrics
    .stat
    strong {
    font-size: 17px;
    white-space: normal;
  }
}

@media (max-width: 600px) {
  body[data-view='article'] main {
    padding-inline: 16px;
  }
  body[data-view='article'] .article-heading {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }
  body[data-view='article'] .article-heading > .article-photo {
    width: 100%;
    height: 180px;
  }
  body[data-view='article'] .article-heading .page-heading h1 {
    font-size: 26px;
  }
  body[data-view='article'] .article-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  body[data-view='article'] .article-summary .stat {
    height: auto;
    min-height: 86px;
    padding: 9px;
    gap: 7px;
  }
  body[data-view='article'] .article-summary .stat strong {
    font-size: var(--record-field-value-size);
    white-space: normal;
  }
  body[data-view='article'] .article-stock-link {
    max-width: 100%;
  }
}

/* Édition directe des fiches : état d'enregistrement et formulaire propriétaire. */
.record-save-status {
  display: flex;
  align-items: center;
  gap: 7px;
  width: max-content;
  max-width: 100%;
  margin: -2px 0 9px;
  color: #167d5b;
  font-size: 11px;
  line-height: 1.35;
  white-space: normal;
}
.record-save-status > .icon {
  width: 15px;
  height: 15px;
  flex: none;
}
.record-save-status b {
  font-weight: 500;
  color: var(--muted);
}
.record-save-status .avatar {
  display: inline-flex;
  width: 18px;
  height: 18px;
  margin-left: 3px;
  vertical-align: middle;
  font-size: 8px;
}
.record-save-actor {
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
}
.record-save-status.saving {
  color: var(--blue);
}
.article-edit-hint {
  display: flex;
  align-items: center;
  min-height: 38px;
  margin: 12px 0;
  padding: 8px 11px;
  border: 1px solid #dce5f6;
  border-radius: 7px;
  background: #f7f9fd;
  color: var(--muted);
  font-size: 12px;
}
.article-edit-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 12px;
  align-items: start;
}
.article-edit-card {
  min-width: 0;
}
.article-edit-wide {
  grid-column: 1/-1;
}
.article-edit-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 14px;
}
.article-inline-field {
  display: grid;
  align-content: start;
  gap: 6px;
  min-width: 0;
}
.article-inline-wide {
  grid-column: 1/-1;
}
.article-inline-label {
  display: flex;
  align-items: center;
  gap: 5px;
  min-height: 22px;
  color: #52699e;
  font-size: 12px;
}
.article-inline-label > label {
  font-weight: 600;
}
.article-field-settings {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #8495bc;
  cursor: pointer;
}
.article-field-settings > .icon {
  width: 14px;
  height: 14px;
}
.article-category-settings {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  width: auto;
  font: inherit;
  color: inherit;
}
[data-article-service-fields][hidden] {
  display: none;
}
.article-field-settings:hover,
.article-field-settings:focus-visible {
  background: #edf2ff;
  color: var(--blue);
  outline: 0;
}
.article-inline-field > input:not([type='checkbox']),
.article-inline-field > select,
.article-inline-field > textarea,
.article-component-inline-row input[type='text'] {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  border: 1px solid #dce3ef;
  border-radius: 6px;
  background: #fff;
  color: var(--navy);
  font: inherit;
  font-size: 14px;
  line-height: 1.4;
  padding: 9px 10px;
  transition:
    border-color 0.15s,
    box-shadow 0.15s,
    background 0.15s;
}
.article-inline-field > input:not([type='checkbox']),
.article-inline-field > select {
  min-height: 40px;
}
.article-inline-field > textarea {
  min-height: 108px;
  resize: vertical;
}
.article-inline-field > input:hover,
.article-inline-field > select:hover,
.article-inline-field > textarea:hover,
.article-component-inline-row input[type='text']:hover {
  border-color: #aebee0;
}
.article-inline-field > input:focus,
.article-inline-field > select:focus,
.article-inline-field > textarea:focus,
.article-component-inline-row input[type='text']:focus {
  border-color: #6f93ee;
  outline: 0;
  box-shadow: 0 0 0 3px #486fff1a;
}
.article-inline-field > input[readonly] {
  background: #f5f7fb;
  color: var(--muted);
  cursor: not-allowed;
}
.article-inline-field > small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}
.article-identity-fields {
  padding: 0 0 14px;
}
.article-identity-fields textarea {
  min-height: 64px;
  height: 64px;
}
.article-inline-toggle-line {
  display: flex;
  align-items: flex-start;
  gap: 6px;
}
.article-inline-label,
.article-inline-toggle-line {
  position: relative;
}
.article-field-help {
  flex: none;
}
.article-field-help > summary {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  color: var(--blue);
  cursor: pointer;
  list-style: none;
}
.article-field-help > summary::-webkit-details-marker {
  display: none;
}
.article-field-help > p {
  position: absolute;
  z-index: 5;
  right: 0;
  width: min(260px, 100%);
  margin: 4px 0 0;
  padding: 10px;
  border: 1px solid #dfe6f2;
  border-radius: 6px;
  background: white;
  color: var(--navy);
  font-size: 12px;
  line-height: 1.4;
  box-shadow: 0 4px 12px #243b6720;
}
.article-inline-toggle {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  width: max-content;
  max-width: 100%;
  color: var(--navy);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.article-inline-toggle > input {
  width: 17px;
  height: 17px;
  flex: none;
  margin-top: 2px;
  accent-color: var(--blue);
}
.article-component-inline {
  display: grid;
  gap: 9px;
}
.article-component-inline > p {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 12px;
}
.article-component-inline-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(120px, 180px);
  align-items: center;
  gap: 14px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
}
.article-component-inline-row > label {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  cursor: pointer;
}
.article-component-inline-row > label > input {
  width: 17px;
  height: 17px;
  flex: none;
  accent-color: var(--blue);
}
.article-component-inline-row > label > span {
  min-width: 0;
}
.article-component-inline-row strong,
.article-component-inline-row small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.article-component-inline-row small,
.article-component-inline-row > div > label {
  color: var(--muted);
  font-size: 11px;
}
.article-component-inline-row > div {
  display: grid;
  gap: 4px;
}
.article-component-inline-row input:disabled {
  background: #f5f7fb;
  color: #9ca8c0;
}
@media (max-width: 900px) {
  .article-edit-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .article-edit-card,
  .article-edit-wide {
    grid-column: 1;
  }
  .article-edit-fields {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (max-width: 600px) {
  .record-save-status {
    margin-top: 0;
  }
  .article-edit-hint {
    line-height: 1.4;
  }
  .article-component-inline-row {
    grid-template-columns: minmax(0, 1fr);
  }
  .article-component-inline-row > div {
    padding-left: 27px;
  }
}

@media (max-width: 600px) {
  body[data-view='manufacturing'] .mfg-summary-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  body[data-view='manufacturing'] .mfg-summary-stats .stat {
    min-width: 0;
    border-bottom: 1px solid var(--line);
  }
  body[data-view='manufacturing'] .mfg-summary-stats .stat strong {
    white-space: normal;
  }
  body[data-view='manufacturing'] .manufacturing-summary {
    grid-template-columns: minmax(0, 1fr);
  }
  body[data-view='manufacturing'] .manufacturing-grid,
  body[data-view='manufacturing'] .manufacturing-grid > *,
  body[data-view='manufacturing'] .manufacturing-grid .card,
  body[data-view='manufacturing'] .operation-row {
    min-width: 0;
  }
  body[data-view='manufacturing'] .mfg-step {
    padding-left: 22px;
  }
  body[data-view='manufacturing'] .operation-body {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 5px 8px;
  }
  body[data-view='manufacturing'] .operation-body > .operation-number {
    grid-row: 1/3;
  }
  body[data-view='manufacturing'] .operation-body > div {
    grid-column: 2;
    grid-row: 1;
  }
  body[data-view='manufacturing'] .operation-body > time {
    grid-column: 2;
    grid-row: 2;
    text-align: left;
  }
  body[data-view='manufacturing'] .operation-body > small {
    grid-column: 3;
    grid-row: 2;
  }
  body[data-view='manufacturing'] .operation-body > .badge {
    grid-column: 3;
    grid-row: 1;
    padding: 4px 7px;
  }
}
@media (max-width: 600px) {
  body[data-view='manufacturing'] .manufacturing-supplies .card-heading {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  body[data-view='manufacturing'] .manufacturing-supplies .card-heading > .btn {
    white-space: normal;
    max-width: 100%;
  }
}

@media (max-width: 600px) {
  body[data-view='flow'] .flow-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  body[data-view='flow'] .flow-stats > [data-flow-stat='invoiced'] {
    grid-column: 1/-1;
  }
  body[data-view='flow'] .flow-stats .stat {
    min-width: 0;
    gap: 8px;
    padding: 10px;
  }
  body[data-view='flow'] .flow-stats .stat-icon {
    padding: 8px;
  }
  body[data-view='flow'] .flow-stats .stat strong {
    font-size: 21px;
  }
  body[data-view='flow'] .flow-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  body[data-view='flow'] .flow-filters .search-field {
    grid-column: 1/-1;
  }
}

@media (max-width: 600px) {
  body[data-view='recommendations'] .recommendation-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  body[data-view='recommendations'] .recommendation-stats .stat {
    min-width: 0;
    min-height: 104px;
    padding: 10px;
    gap: 8px;
  }
  body[data-view='recommendations'] .recommendation-stats .stat-icon > .icon {
    width: 28px;
    height: 28px;
  }
  body[data-view='recommendations'] .recommendation-stats .stat strong {
    font-size: 19px;
    white-space: normal;
  }
  body[data-view='recommendations'] .recommendation-filters {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  body[data-view='recommendations'] .recommendation-filters > .search-field {
    grid-column: 1/-1;
  }
  body[data-view='recommendations'] .recommendation-tabs > strong {
    flex-basis: 100%;
  }
}
@media (min-width: 1201px) {
  body[data-view='gantt'] .hero-card.project-hero.planning-hero {
    height: 140px;
    min-height: 140px;
    grid-template-columns: 180px minmax(195px, 1fr) minmax(325px, 1.4fr);
    gap: 14px;
  }
  body[data-view='gantt'] .hero-card.project-hero.planning-hero .hero-photo {
    height: 120px;
  }
  body[data-view='gantt'] .hero-card.project-hero.planning-hero .hero-info,
  body[data-view='gantt'] .hero-card.project-hero.planning-hero .hero-metrics {
    height: 120px;
  }
  body[data-view='gantt'] .hero-card.project-hero.planning-hero .hero-info {
    gap: 4px;
  }
  body[data-view='gantt'] .hero-card.project-hero.planning-hero .hero-person {
    gap: 8px;
  }
  body[data-view='gantt'] .hero-card.project-hero.planning-hero .hero-person > .icon {
    width: 20px;
    height: 20px;
    margin-top: 2px;
  }
  body[data-view='gantt'] .hero-card.project-hero.planning-hero .hero-person small {
    font-size: 11px;
    line-height: 14px;
  }
  body[data-view='gantt'] .hero-card.project-hero.planning-hero .hero-person strong {
    font-size: 14px;
    line-height: 17px;
  }
  body[data-view='gantt'] .hero-card.project-hero.planning-hero .hero-description {
    font-size: 11px;
    line-height: 1.2;
  }
}
@media (min-width: 1201px) {
  body[data-view='gantt'] {
    --right: 304px;
  }
  body[data-view='gantt'] main {
    padding-inline: 14px;
  }
  body[data-view='gantt'] .hero-card.project-hero.planning-hero {
    height: 164px;
    min-height: 164px;
    grid-template-columns: 218px minmax(195px, 1fr) minmax(325px, 1.4fr);
  }
  body[data-view='gantt'] .hero-card.project-hero.planning-hero .hero-photo {
    height: 144px;
  }
  body[data-view='gantt'] .hero-card.project-hero.planning-hero .hero-info,
  body[data-view='gantt'] .hero-card.project-hero.planning-hero .hero-metrics {
    height: 144px;
  }
  body[data-view='gantt'] main > .tabs {
    margin-top: 6px;
    margin-bottom: 6px;
  }
  body[data-view='gantt'] .gantt-controls {
    gap: 4px;
    margin-top: 8px;
  }
}
/* En-tête et commandes communs des vues Liste, Kanban, Calendrier et Recommandations. */
.collection-head.collection-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 4px 4px 0;
}
.collection-head > .page-heading.page-heading {
  flex: 1;
  min-width: 0;
  margin: 0 0 10px;
}
.collection-head > .page-heading > div,
.collection-head > .page-heading > div > div {
  min-width: 0;
  max-width: 100%;
}
.collection-head .page-heading p {
  white-space: normal;
  overflow-wrap: anywhere;
}
.collection-head > .tabs.tabs {
  flex: none;
  width: max-content;
  max-width: 58%;
  min-height: 40px;
  margin: 0 0 10px;
}
.collection-head > .tabs.tabs > button {
  min-width: 0;
  padding: 8px 12px;
}
.collection-head.project-view-head > .project-view-tabs {
  justify-content: flex-end;
}
body[data-view='calendar'] .collection-head.collection-head:not(.project-view-head) {
  display: block;
}
body[data-view='calendar'] .collection-head > .page-heading.page-heading {
  margin-bottom: 14px;
}
body[data-view='calendar'] .collection-head > .tabs.tabs {
  max-width: 100%;
}
body[data-view='calendar'] .collection-head > .tabs.tabs > button {
  flex: none;
  min-width: max-content;
}
@media (min-width: 1201px) {
  body[data-view='calendar'] .calendar-backlog {
    padding-top: 20px;
  }
  body[data-view='calendar'] .calendar-backlog > article {
    min-height: 155px;
  }
}
body[data-view='quotes'] .collection-head.collection-head {
  display: block;
}
@media (min-width: 1201px) {
  body[data-view='quotes'] {
    --right: 324px;
  }
  body[data-view='quotes'] main {
    padding-right: 33px;
  }
  body[data-view='quotes'] .right-panel {
    padding-left: 10px;
    padding-right: 22px;
  }
  body[data-view='quotes'] .collection-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }
  body[data-view='quotes'] .collection-toolbar > .filters {
    width: 100%;
    margin: 0;
  }
  body[data-view='quotes'] .collection-toolbar > .pagination {
    width: auto;
    justify-self: end;
    margin: 0;
  }
}
@media (min-width: 1251px) {
  body[data-view='recommendations'] .recommendation-view-heading > .page-heading.page-heading {
    margin-bottom: 3px;
  }
}
.collection-toolbar {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  margin: 0 0 10px;
  min-width: 0;
}
.collection-toolbar > .filters,
.collection-toolbar > .calendar-filters,
.collection-toolbar > .catalogue-filters,
.collection-toolbar > .personal-task-controls,
.collection-toolbar > .timesheet-toolbar {
  flex: 1;
  min-width: 0;
  margin: 0;
}
.collection-toolbar > .pagination {
  flex: none;
  margin: 0;
  white-space: nowrap;
}
.task-filter-toolbar {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  align-items: end;
  min-width: 0;
  margin: 8px 0 14px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
}
.task-filter-toolbar > label {
  display: grid;
  gap: 5px;
  min-width: 0;
  color: var(--blue);
  font-size: 13px;
}
.task-filter-toolbar > label:first-child {
  grid-column: span 2;
}
.task-filter-toolbar input,
.task-filter-toolbar select {
  width: 100%;
  min-width: 0;
  min-height: 38px;
}
.collection-toolbar .operations-filters {
  display: flex;
  align-items: flex-end;
  gap: 10px;
}
.collection-toolbar .operations-filters > label {
  display: grid;
  gap: 5px;
  min-width: 135px;
  flex: 1;
  color: var(--blue);
  font-size: 13px;
}
.collection-toolbar .operations-filters input,
.collection-toolbar .operations-filters select {
  width: 100%;
  min-height: 38px;
}
.timesheet-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
}
.timesheet-toolbar label {
  display: grid;
  gap: 5px;
  color: var(--blue);
  font-size: 13px;
}
.timesheet-toolbar input {
  min-height: 38px;
}
.timesheet-actions {
  display: flex;
  gap: 5px;
}
@media (max-width: 1200px) {
  .collection-toolbar {
    flex-wrap: wrap;
  }
  .collection-toolbar > .pagination {
    width: 100%;
  }
  .task-filter-toolbar {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 800px) {
  .collection-head.collection-head {
    display: block;
  }
  .collection-head > .tabs.tabs {
    width: 100%;
    max-width: 100%;
    margin: 0 0 10px;
  }
  .collection-toolbar .operations-filters {
    flex-wrap: wrap;
  }
}
@media (max-width: 600px) {
  .collection-toolbar {
    display: block;
  }
  .task-filter-toolbar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 8px;
  }
  .task-filter-toolbar > label:first-child {
    grid-column: 1 / -1;
  }
  .collection-toolbar > .pagination {
    margin-top: 8px;
    overflow-x: auto;
  }
  .collection-toolbar .operations-filters {
    display: grid;
    grid-template-columns: 1fr;
  }
  .timesheet-toolbar {
    align-items: stretch;
    flex-direction: column;
  }
  .collection-head > .tabs.tabs > button {
    padding-inline: 10px;
  }
}
@media (max-width: 600px) {
  .collection-toolbar > .pagination {
    display: grid;
    grid-template-columns: repeat(3, auto) minmax(100px, 1fr);
    justify-content: start;
    gap: 8px;
    overflow: visible;
  }
  .collection-toolbar > .pagination > span:first-child {
    grid-column: 1/-1;
    margin-right: 0;
  }
  .collection-toolbar > .pagination > select {
    min-width: 100px;
    width: 100%;
    margin-left: 0;
  }
}

/* Les vues complexes restent entièrement lisibles sans défilement horizontal aux formats tablette et mobile. */
.recommendation-mobile-tools,
.mobile-right-tools {
  display: none;
}
@media (max-width: 1200px) {
  body[data-view='gantt'] .gantt {
    min-width: 0 !important;
    --label: 48%;
  }
  body[data-view='gantt'] .gantt {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }
  body[data-view='gantt'] .gantt-scroll {
    overflow-x: clip;
  }
  body[data-view='gantt'] .gantt-label {
    grid-template-columns: 22px minmax(0, 1fr);
  }
  body[data-view='gantt'] .gantt-label > time,
  body[data-view='gantt'] .gantt-label > small:last-child {
    display: none;
  }
  body[data-view='gantt'] .gantt-row.group-row .gantt-label {
    grid-template-columns: 22px minmax(0, 1fr);
  }
  body[data-view='gantt'] .gantt-milestone > small {
    display: none;
  }
  body[data-view='gantt'] .dependency-lines {
    overflow: hidden;
  }
}
@media (max-width: 900px) {
  body:is(
      [data-view='quotes'],
      [data-view='quote'],
      [data-view='order'],
      [data-view='calendar'],
      [data-view='opportunities'],
      [data-view='opportunity'],
      [data-view='project'],
      [data-view='tasks'],
      [data-view='task'],
      [data-view='contact'],
      [data-view='contacts'],
      [data-view='article'],
      [data-view='manufacturing'],
      [data-view='document-library']
    )
    .mobile-right-tools {
    display: inline-flex;
    margin: 0 0 10px;
  }
  body:is(
      [data-view='quotes'],
      [data-view='quote'],
      [data-view='order'],
      [data-view='calendar'],
      [data-view='opportunities'],
      [data-view='opportunity'],
      [data-view='project'],
      [data-view='tasks'],
      [data-view='task'],
      [data-view='contact'],
      [data-view='contacts'],
      [data-view='article'],
      [data-view='manufacturing'],
      [data-view='document-library']
    )
    .right-panel {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 54px;
    right: 0;
    bottom: 0;
    width: min(330px, calc(100vw - var(--rail)));
    box-sizing: border-box;
    padding: 10px 11px 16px;
    z-index: 30;
    transform: translateX(105%);
    visibility: hidden;
    transition:
      transform 0.18s ease,
      visibility 0.18s;
    background: #fff;
    box-shadow: -12px 0 32px #07125328;
  }
  body.right-mobile-open[data-view='quotes'] .right-panel,
  body.right-mobile-open[data-view='quote'] .right-panel,
  body.right-mobile-open[data-view='order'] .right-panel,
  body.right-mobile-open[data-view='calendar'] .right-panel,
  body.right-mobile-open[data-view='opportunities'] .right-panel,
  body.right-mobile-open[data-view='opportunity'] .right-panel,
  body.right-mobile-open[data-view='project'] .right-panel,
  body.right-mobile-open[data-view='tasks'] .right-panel,
  body.right-mobile-open[data-view='task'] .right-panel,
  body.right-mobile-open[data-view='contact'] .right-panel,
  body.right-mobile-open[data-view='contacts'] .right-panel,
  body.right-mobile-open[data-view='article'] .right-panel,
  body.right-mobile-open[data-view='manufacturing'] .right-panel,
  body.right-mobile-open[data-view='document-library'] .right-panel {
    transform: none;
    visibility: visible;
  }
  body:is(
      [data-view='quotes'],
      [data-view='quote'],
      [data-view='order'],
      [data-view='calendar'],
      [data-view='opportunities'],
      [data-view='opportunity'],
      [data-view='project'],
      [data-view='tasks'],
      [data-view='task'],
      [data-view='contact'],
      [data-view='contacts'],
      [data-view='article'],
      [data-view='manufacturing'],
      [data-view='document-library']
    )
    .right-panel
    #right-content {
    height: calc(100% - 48px);
    overflow: auto;
  }
  body.right-mobile-open[data-view='quotes'] .mobile-right-tools,
  body.right-mobile-open[data-view='quote'] .mobile-right-tools,
  body.right-mobile-open[data-view='order'] .mobile-right-tools,
  body.right-mobile-open[data-view='calendar'] .mobile-right-tools,
  body.right-mobile-open[data-view='opportunities'] .mobile-right-tools,
  body.right-mobile-open[data-view='opportunity'] .mobile-right-tools,
  body.right-mobile-open[data-view='project'] .mobile-right-tools,
  body.right-mobile-open[data-view='tasks'] .mobile-right-tools,
  body.right-mobile-open[data-view='task'] .mobile-right-tools,
  body.right-mobile-open[data-view='contact'] .mobile-right-tools,
  body.right-mobile-open[data-view='contacts'] .mobile-right-tools,
  body.right-mobile-open[data-view='article'] .mobile-right-tools,
  body.right-mobile-open[data-view='manufacturing'] .mobile-right-tools,
  body.right-mobile-open[data-view='document-library'] .mobile-right-tools {
    visibility: hidden;
  }
  body[data-view='recommendations'] .recommendation-mobile-tools {
    display: inline-flex;
    margin: 0 0 10px;
  }
  body[data-view='recommendations'] .right-panel {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 54px;
    right: 0;
    bottom: 0;
    width: min(330px, calc(100vw - var(--rail)));
    padding: 10px 11px 16px;
    z-index: 30;
    transform: translateX(105%);
    visibility: hidden;
    transition:
      transform 0.18s ease,
      visibility 0.18s;
    background: #fff;
    box-shadow: -12px 0 32px #07125328;
  }
  body.right-mobile-open[data-view='recommendations'] .right-panel {
    transform: none;
    visibility: visible;
  }
  body[data-view='recommendations'] .right-panel #right-content {
    height: calc(100% - 48px);
    overflow: auto;
  }
  body.right-mobile-open[data-view='recommendations'] .recommendation-mobile-tools {
    visibility: hidden;
  }
}
@media (max-width: 600px) {
  body[data-view='gantt'] .gantt {
    --label: 58%;
  }
  body[data-view='gantt'] .gantt-months > span {
    font-size: 9px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  body[data-view='gantt'] .gantt-header.weeks span {
    font-size: 9px;
  }
}

.quote-lines .quote-component-visibility {
  display: inline-flex;
  align-items: center;
  margin-left: 6px;
  color: #c56239;
  font-size: 11px;
  white-space: nowrap;
}

/* Le récapitulatif garde ses montants lisibles lorsque les contrôles de remise sont présents. */
body[data-view='quote'] .quote-total-main {
  display: grid;
  grid-template-columns: auto minmax(105px, 0.8fr) minmax(160px, 1.2fr);
  grid-template-areas: 'icon title details' 'icon discount rounding';
  align-items: center;
  gap: 6px 10px;
}
body[data-view='quote'] .quote-total-main > .icon {
  grid-area: icon;
}
body[data-view='quote'] .quote-total-main > strong {
  grid-area: title;
  max-width: none;
}
body[data-view='quote'] .quote-total-main > .details {
  grid-area: details;
  min-width: 0;
}
body[data-view='quote'] .quote-total-main > .quote-global-discount {
  grid-area: discount;
  margin-top: 0;
  white-space: nowrap;
}
body[data-view='quote'] .quote-total-main > small {
  grid-area: rounding;
  margin-top: 0;
  white-space: nowrap;
}
@media (max-width: 600px) {
  body[data-view='quote'] .quote-total-main {
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-areas: 'icon title' 'icon details' 'discount rounding';
  }
  body[data-view='quote'] .quote-total-main > .quote-global-discount {
    grid-column: 1;
    grid-row: 3;
  }
  body[data-view='quote'] .quote-total-main > small {
    grid-column: 2;
    grid-row: 3;
  }
}

/* Dans les devis brouillons, les textes et conditions se modifient au même endroit où ils sont lus. */
.quote-inline-value {
  display: inline;
  padding: 0;
  border: 0;
  border-bottom: 1px dashed transparent;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: inherit;
  text-align: inherit;
  cursor: pointer;
}
.quote-inline-value:hover,
.quote-inline-value:focus-visible {
  border-bottom-color: currentColor;
  outline: 0;
}
.quote-inline-editor {
  box-sizing: border-box;
  max-width: 100%;
  border: 1px solid #8baeff;
  border-radius: 5px;
  padding: 4px 6px;
  background: white;
  color: var(--navy);
  font: inherit;
  line-height: 1.35;
  box-shadow: 0 0 0 2px #486fff20;
}
.quote-inline-document > .quote-inline-value {
  display: block;
  width: 100%;
  min-height: 20px;
  text-align: left;
}
.quote-inline-document > .quote-inline-editor {
  display: block;
  width: 100%;
  resize: vertical;
}
.details .quote-inline-editor {
  width: 100%;
  font-weight: 600;
}
.quote-opportunity-card h3 {
  margin: 0 0 8px;
  font-size: 15px;
}
.quote-opportunity-card > .btn {
  width: 100%;
  justify-content: center;
  margin-top: 8px;
}
.planning-source-note {
  margin: 12px 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}
@media (max-width: 600px) {
  .quote-opportunity-card > .details > div {
    grid-template-columns: minmax(95px, 0.8fr) minmax(0, 1.2fr);
  }
}

/* Espace Conversations : navigation Slack-like dans les composants Soonply existants. */
.conversation-workspace {
  display: grid;
  grid-template-columns: minmax(250px, 0.72fr) minmax(0, 2fr);
  gap: 14px;
  align-items: stretch;
  min-height: 640px;
}
.conversation-workspace > .conversation-channel-list {
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 220px);
  overflow: hidden;
}
.conversation-search {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 10px 12px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--muted);
}
.conversation-search input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  font: inherit;
  color: var(--navy);
}
.conversation-filters {
  display: flex;
  gap: 4px;
  overflow: auto;
  padding: 0 12px 10px;
}
.conversation-filters button {
  flex: none;
  border: 0;
  border-radius: 6px;
  padding: 6px 8px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}
.conversation-filters button:hover,
.conversation-filters button.active {
  background: #fff0ea;
  color: var(--orange);
  font-weight: 700;
}
.conversation-channel-list > .conversation-sort {
  padding: 0 12px 10px;
}
.conversation-tree {
  min-height: 0;
  overflow: auto;
  border-top: 1px solid var(--line);
}
.conversation-transverse {
  margin-top: auto;
  border-top: 1px solid var(--line);
  background: #fbfcff;
}
.conversation-transverse > header {
  padding: 10px 12px 4px;
}
.conversation-transverse > header strong {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: var(--navy);
}
.conversation-channel-list .conversation-channel,
.conversation-channel-list .conversation-root {
  align-items: center;
}
.conversation-channel-list .conversation-channel > span,
.conversation-channel-list .conversation-root > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.conversation-unread {
  display: grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  margin-left: auto;
  border-radius: 9px;
  background: var(--orange);
  color: #fff;
  font-size: 10px;
}
.conversation-favorite {
  margin-left: auto;
  color: #f3ab17;
  fill: #f3ab17;
}
.conversation-message-list {
  flex: 1;
}
.conversation-thread {
  display: flex;
  min-height: 0;
  flex-direction: column;
}
.conversation-thread-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}
.conversation-thread.compact {
  border: 0;
  border-radius: 0;
}
.conversation-thread.compact .conversation-thread-heading {
  padding: 10px 12px;
}
.conversation-thread.compact .conversation-thread-heading h2 {
  font-size: 15px;
}
.conversation-thread.compact .conversation-message-list {
  min-height: 170px;
  max-height: 300px;
  padding: 12px;
}
.conversation-thread.compact .conversation-composer {
  padding: 12px;
}
.conversation-reactions {
  display: flex;
  gap: 5px;
  margin-top: 7px;
}
.conversation-reply-button {
  border: 0;
  padding: 2px 4px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}
.conversation-reply-preview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-left: 3px solid var(--blue);
  padding: 7px 9px;
  background: #edf4ff;
}
.conversation-reply-preview[hidden] {
  display: none;
}
.conversation-reply-preview > div {
  display: grid;
  gap: 3px;
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
}
.conversation-reply-preview span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.conversation-reply-preview button {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 20px;
  cursor: pointer;
}
.conversation-reaction,
.conversation-add-reaction {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  min-height: 24px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 2px 6px;
  background: #fff;
  color: var(--navy);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}
.conversation-reaction:hover,
.conversation-add-reaction:hover {
  border-color: #b8d3ff;
  background: #edf4ff;
  color: var(--blue);
}
.conversation-add-reaction {
  padding: 2px 4px;
}
.conversation-attachment {
  display: flex;
  align-items: center;
  gap: 7px;
  max-width: 100%;
  margin-top: 8px;
  border: 1px solid #b8d3ff;
  border-radius: 7px;
  padding: 7px 9px;
  background: #f7fbff;
  color: var(--blue);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.conversation-attachment span {
  display: grid;
  min-width: 0;
}
.conversation-attachment small {
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.discussion-panel-thread > .card-heading {
  align-items: flex-start;
}
.discussion-panel-thread .conversation-composer footer {
  align-items: flex-start;
  flex-direction: column;
}
.discussion-panel-thread .conversation-composer footer > div {
  width: 100%;
}
.discussion-panel-thread .conversation-composer footer > div > .btn {
  flex: 1;
  justify-content: center;
}
@media (max-width: 1100px) {
  .conversation-workspace {
    grid-template-columns: minmax(220px, 0.8fr) minmax(0, 1.8fr);
  }
  .conversation-workspace > .conversation-channel-list {
    max-height: none;
  }
  .conversation-message-list {
    max-height: none;
  }
}
@media (max-width: 800px) {
  .conversation-workspace {
    grid-template-columns: 1fr;
    min-height: 0;
  }
  .conversation-workspace > .conversation-channel-list {
    max-height: 330px;
  }
  .conversation-tree {
    max-height: 180px;
  }
  .conversation-thread {
    min-height: 430px;
  }
}
@media (max-width: 600px) {
  .conversation-filters {
    padding-bottom: 8px;
  }
  .conversation-search {
    margin-bottom: 8px;
  }
  .conversation-workspace > .conversation-channel-list {
    max-height: 285px;
  }
  .conversation-thread.compact .conversation-message-list {
    max-height: 260px;
  }
  .conversation-reactions {
    flex-wrap: wrap;
  }
}

.conversation-filters {
  align-items: center;
  min-height: 32px;
}
.conversation-filters button {
  min-height: 28px;
  line-height: 1.2;
}

/* Automatisations : scénario linéaire et suivi des exécutions. */
.automation-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 14px;
}
.automation-stats > div {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 0 9px;
  align-items: center;
  min-height: 70px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
}
.automation-stats span {
  grid-row: 1/3;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: #fff0ea;
  color: var(--orange);
}
.automation-stats strong {
  color: var(--navy);
  font-size: 23px;
}
.automation-stats small,
.automation-table small,
.automation-runs small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}
.automation-title {
  display: block;
  color: var(--navy);
  text-decoration: none;
}
.automation-title:hover strong {
  color: var(--blue);
  text-decoration: underline;
}
.automation-table td:last-child {
  width: 1%;
  white-space: nowrap;
}
.automation-empty {
  padding: 26px 14px;
}
.automation-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(230px, 0.8fr);
  gap: 14px;
  margin-bottom: 14px;
}
.automation-flow {
  display: grid;
  gap: 0;
}
.automation-node {
  position: relative;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 10px;
  padding: 12px 0;
}
.automation-node:not(:last-child):after {
  content: '';
  position: absolute;
  top: 42px;
  bottom: -2px;
  left: 14px;
  width: 2px;
  background: #cbdcff;
}
.automation-node > span {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 2px solid #a8c4ff;
  border-radius: 50%;
  background: #fff;
  color: var(--blue);
  font-size: 12px;
  font-weight: 700;
}
.automation-node strong {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--navy);
  font-size: 14px;
}
.automation-node strong .icon {
  color: var(--orange);
}
.automation-node p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  overflow-wrap: anywhere;
}
.automation-node.wait > span {
  border-color: #efba3d;
  color: #b57200;
}
.automation-node.end > span {
  border-color: #34bb83;
  color: #12935b;
}
.automation-head-actions {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.automation-editor-note {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}
@media (max-width: 900px) {
  .automation-detail-grid {
    grid-template-columns: 1fr;
  }
  .automation-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 600px) {
  .automation-stats {
    grid-template-columns: 1fr;
  }
  .automation-head-actions {
    justify-content: stretch;
  }
  .automation-head-actions > .btn {
    flex: 1;
  }
  .automation-table-wrap {
    overflow: auto;
  }
  .automation-table {
    min-width: 640px;
  }
}

/* Éditeur d'automatisation : palette, canevas et configuration restent visibles ensemble. */
.automation-designer {
  margin: 0 0 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  overflow: hidden;
}
.automation-designer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 52px;
  padding: 0 14px;
  border-bottom: 1px solid var(--line);
}
.automation-designer-header > div {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}
.automation-designer-header > div > span {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}
.automation-designer-header small {
  color: var(--muted);
  font-size: 12px;
}
.automation-builder {
  display: grid;
  grid-template-columns: 190px minmax(330px, 1fr) minmax(250px, 300px);
  min-height: 430px;
}
.automation-palette {
  padding: 14px;
  border-right: 1px solid var(--line);
  background: #fbfcff;
}
.automation-palette h3 {
  margin: 0;
  color: var(--navy);
  font-size: 14px;
}
.automation-palette p {
  margin: 5px 0 12px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}
.automation-palette .btn {
  width: 100%;
  justify-content: flex-start;
  margin: 0 0 7px;
}
.automation-canvas-wrap {
  min-width: 0;
  padding: 16px;
  overflow: auto;
  background-color: #fff;
  background-image: radial-gradient(#dce6fb 1px, transparent 1px);
  background-size: 14px 14px;
}
.automation-canvas-note {
  max-width: 560px;
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}
.automation-canvas {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: max-content;
  min-height: 285px;
  padding: 10px;
}
.automation-canvas-arrow {
  color: #8291b7;
  font-size: 22px;
}
.automation-canvas-node {
  display: grid;
  grid-template-columns: 26px minmax(120px, 1fr);
  gap: 4px 7px;
  width: 158px;
  min-height: 102px;
  padding: 12px;
  border: 1px solid #bdd1ff;
  border-radius: 9px;
  background: #fff;
  color: var(--navy);
  text-align: left;
  box-shadow: 0 2px 5px #10245d0d;
  cursor: pointer;
}
.automation-canvas-node:hover,
.automation-canvas-node:focus-visible,
.automation-canvas-node.selected {
  border-color: var(--blue);
  outline: 0;
  box-shadow: 0 0 0 3px #2868ff1c;
}
.automation-canvas-node > span {
  grid-row: 1/3;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #edf4ff;
  color: var(--blue);
  font-size: 11px;
  font-weight: 700;
}
.automation-canvas-node strong {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  line-height: 1.25;
}
.automation-canvas-node strong .icon {
  width: 16px;
  height: 16px;
  color: var(--orange);
}
.automation-canvas-node small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.automation-canvas-node.condition {
  border-color: #ffc69e;
}
.automation-canvas-node.condition > span {
  background: #fff2e7;
  color: #d2601f;
}
.automation-canvas-node.wait {
  border-color: #d9c7ff;
}
.automation-canvas-node.wait > span {
  background: #f0eaff;
  color: #7548d5;
}
.automation-canvas-node.end {
  border-color: #9ae3c4;
}
.automation-canvas-node.end > span {
  background: #e5faf0;
  color: #15975b;
}
.automation-config {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 16px;
  border-left: 1px solid var(--line);
  background: #fff;
}
.automation-config > header {
  display: flex;
  align-items: center;
  gap: 10px;
}
.automation-config > header > span {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 9px;
  background: #edf4ff;
  color: var(--blue);
}
.automation-config h3 {
  margin: 2px 0 0;
  color: var(--navy);
  font-size: 15px;
}
.automation-config header small {
  color: var(--muted);
  font-size: 11px;
}
.automation-config-help {
  margin: 12px 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}
.automation-config form {
  display: flex;
  flex: 1;
  flex-direction: column;
}
.automation-config-fields {
  display: grid;
  gap: 10px;
}
.automation-config-fields label {
  display: grid;
  gap: 5px;
  color: var(--navy);
  font-size: 12px;
  font-weight: 600;
}
.automation-config-fields input,
.automation-config-fields select,
.automation-config-fields textarea {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  font: inherit;
  font-weight: 400;
}
.automation-config-fields textarea {
  min-height: 76px;
  resize: vertical;
}
.automation-config-actions {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.automation-config-actions .btn {
  width: 100%;
  justify-content: center;
}
@media (max-width: 1180px) {
  .automation-builder {
    grid-template-columns: 175px minmax(280px, 1fr);
  }
  .automation-config {
    grid-column: 1/-1;
    border-top: 1px solid var(--line);
    border-left: 0;
  }
  .automation-config-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .automation-config-fields .full-width {
    grid-column: 1/-1;
  }
  .automation-config-actions {
    margin-top: 6px;
  }
}
@media (max-width: 760px) {
  .automation-designer-header {
    align-items: flex-start;
    padding: 12px;
  }
  .automation-designer-header > div {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .automation-builder {
    grid-template-columns: 1fr;
  }
  .automation-palette {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .automation-palette h3,
  .automation-palette p {
    grid-column: 1/-1;
  }
  .automation-palette .btn {
    margin: 0;
  }
  .automation-canvas-wrap {
    min-height: 260px;
  }
  .automation-config-fields {
    grid-template-columns: 1fr;
  }
  .automation-config-fields .full-width {
    grid-column: auto;
  }
}
@media (max-width: 420px) {
  .automation-palette {
    grid-template-columns: 1fr;
  }
  .automation-canvas {
    min-height: 235px;
  }
  .automation-canvas-node {
    width: 145px;
  }
}
.automation-test-results {
  display: grid;
  gap: 8px;
  margin: 14px 0 0;
  padding-left: 22px;
}
.automation-test-results li {
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fbfcff;
}
.automation-test-results small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
}

/* Discussions internes rattachées aux affaires. */
.conversation-layout {
  display: grid;
  grid-template-columns: minmax(215px, 0.7fr) minmax(0, 2fr);
  gap: 14px;
  align-items: start;
}
.conversation-channel-list,
.conversation-thread {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  min-width: 0;
}
.conversation-channel-list > header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 10px;
  padding: 14px;
  border-bottom: 1px solid var(--line);
}
.conversation-channel-list > header strong {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--navy);
}
.conversation-channel-list > header small,
.conversation-root small,
.conversation-channel-list .empty {
  color: var(--muted);
}
.conversation-sort {
  display: grid;
  gap: 3px;
  color: var(--muted);
  font-size: 11px;
}
.conversation-sort select {
  min-width: 120px;
  padding: 4px 6px;
  font-size: 12px;
}
.conversation-channel-list section {
  padding: 7px;
  border-bottom: 1px solid var(--line);
}
.conversation-channel-list section:last-child {
  border-bottom: 0;
}
.conversation-dossier > header {
  display: flex;
  align-items: start;
  gap: 3px;
}
.conversation-collapse,
.conversation-dossier-actions button {
  display: grid;
  place-items: center;
  flex: none;
  width: 25px;
  height: 25px;
  padding: 0;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.conversation-collapse:hover,
.conversation-dossier-actions button:hover {
  background: #edf4ff;
  color: var(--blue);
}
.conversation-dossier-actions {
  display: flex;
  margin-left: auto;
}
.conversation-dossier-actions button:disabled {
  visibility: hidden;
}
.conversation-root,
.conversation-channel {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  border-radius: 7px;
  padding: 8px;
  color: var(--navy);
  text-decoration: none;
}
.conversation-root {
  flex: 1;
  min-width: 0;
}
.conversation-root > span {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.conversation-root small {
  font-size: 11px;
}
.conversation-channel {
  margin-left: 30px;
  font-size: 13px;
}
.conversation-root:hover,
.conversation-channel:hover,
.conversation-root.active,
.conversation-channel.active {
  background: #edf4ff;
  color: var(--blue);
}
.conversation-dossier-dragging {
  opacity: 0.5;
}
.conversation-dossier-drop {
  box-shadow: inset 0 2px 0 var(--blue);
}
.conversation-thread-heading {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border-bottom: 1px solid var(--line);
}
.conversation-thread-heading > div:first-child {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.conversation-thread-heading h2 {
  margin: 0;
  color: var(--navy);
  font-size: 18px;
}
.conversation-thread-heading p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 13px;
}
.conversation-thread-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: #fff0ea;
  color: var(--orange);
}
.conversation-message-list {
  display: grid;
  gap: 14px;
  min-height: 280px;
  max-height: 480px;
  overflow: auto;
  padding: 16px;
}
.conversation-message {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 9px;
}
.conversation-message .avatar {
  width: 32px;
  height: 32px;
}
.conversation-message header {
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.conversation-message time {
  color: var(--muted);
  font-size: 11px;
}
.conversation-message .conversation-reply-quote {
  display: grid;
  gap: 3px;
  margin: 6px 0;
  border-left: 3px solid var(--blue);
  padding: 5px 8px;
  background: #edf4ff;
  color: var(--muted);
  font-size: 12px;
}
.conversation-reply-quote span {
  overflow-wrap: anywhere;
}
.conversation-message p {
  margin: 4px 0 0;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.conversation-message mark {
  padding: 1px 4px;
  border-radius: 4px;
  background: #e9ddff;
  color: #6140bd;
}
.conversation-task-link {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 6px;
  color: var(--green);
}
.conversation-empty {
  align-self: center;
  margin: auto;
  color: var(--muted);
  text-align: center;
}
.conversation-composer {
  display: grid;
  gap: 7px;
  border-top: 1px solid var(--line);
  padding: 14px;
}
.conversation-composer > label {
  font-weight: 700;
  color: var(--navy);
}
.conversation-composer textarea {
  width: 100%;
  min-height: 78px;
  box-sizing: border-box;
  resize: vertical;
}
.conversation-send-hint {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}
.conversation-send-hint[data-state='erreur'] {
  color: #b42318;
  font-weight: 600;
}
.conversation-send-hint[data-state='envoye'] {
  color: var(--green);
  font-weight: 600;
}
.conversation-suggestions {
  display: grid;
  max-height: 160px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  box-shadow: 0 6px 18px #18336b1a;
}
.conversation-suggestions button {
  display: grid;
  gap: 2px;
  padding: 8px 10px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: #fff;
  color: var(--navy);
  text-align: left;
  cursor: pointer;
}
.conversation-suggestions button:last-child {
  border-bottom: 0;
}
.conversation-suggestions button:hover {
  background: #edf4ff;
}
.conversation-suggestions small {
  color: var(--muted);
}
.conversation-composer footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.conversation-composer footer > span {
  color: var(--muted);
  font-size: 12px;
}
.conversation-composer footer > div {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.discussion-context-channels {
  display: grid;
  gap: 6px;
  padding: 12px;
}
.discussion-context-channels a {
  display: grid;
  gap: 3px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--navy);
  text-decoration: none;
}
.discussion-context-channels a:hover,
.discussion-context-channels a.active {
  border-color: #b8d3ff;
  background: #edf4ff;
  color: var(--blue);
}
.discussion-context-channels span {
  display: flex;
  align-items: center;
  gap: 7px;
}
.discussion-context-channels small {
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.discussion-mention-help {
  margin: 0;
  padding: 0 12px 12px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}
@media (max-width: 900px) {
  .conversation-layout {
    grid-template-columns: 1fr;
  }
  .conversation-channel-list {
    max-height: 280px;
    overflow: auto;
  }
  .conversation-message-list {
    max-height: none;
  }
  .conversation-composer footer {
    align-items: flex-start;
    flex-direction: column;
  }
  .conversation-composer footer > div {
    width: 100%;
  }
  .conversation-composer footer > div > .btn {
    flex: 1;
    justify-content: center;
  }
}
@media (max-width: 600px) {
  .conversation-channel-list > header {
    align-items: stretch;
    flex-direction: column;
  }
  .conversation-sort select {
    width: 100%;
  }
  .conversation-thread-heading {
    align-items: flex-start;
    flex-direction: column;
  }
  .conversation-thread-heading > .btn {
    width: 100%;
    justify-content: center;
  }
  .conversation-message-list {
    padding: 12px;
    min-height: 220px;
  }
  .conversation-composer {
    padding: 12px;
  }
  .conversation-channel {
    margin-left: 20px;
  }
}

.automation-condition-list {
  display: grid;
  gap: 9px;
}
.automation-condition-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr) minmax(0, 1fr) auto;
  gap: 6px;
  padding: 8px;
  border: 1px solid #dce6fb;
  border-radius: 8px;
  background: #fbfcff;
}
.automation-condition-row .btn {
  align-self: end;
  min-height: 34px;
}
@media (max-width: 1180px) {
  .automation-condition-row {
    grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  }
}
@media (max-width: 760px) {
  .automation-condition-row {
    grid-template-columns: 1fr;
  }
  .automation-condition-row .btn {
    justify-self: start;
  }
}

/* Cycle commercial : le devis prépare la commande, les avantages et le port restent lisibles. */
body[data-view='quote'] .quote-commercial-totals {
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: 'actions' 'summary';
}
body[data-view='quote'] .quote-commercial-totals > * {
  min-width: 0;
}
body[data-view='quote'] .quote-commercial-totals .quote-commercial-actions {
  grid-area: actions;
}
body[data-view='quote'] .quote-commercial-totals .quote-total-main {
  grid-area: summary;
  justify-self: start;
  width: min(100%, 560px);
  grid-template-columns: auto minmax(115px, 0.8fr) minmax(175px, 1.25fr);
  grid-template-areas: 'icon title details' 'icon rounding rounding';
}
.quote-commercial-actions {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
}
.quote-commercial-actions > strong {
  color: var(--navy);
  font-size: 14px;
}
.quote-commercial-actions > div:first-of-type {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
}
.quote-commercial-actions > div:first-of-type > .btn {
  min-width: 0;
  min-height: 38px;
  justify-content: center;
  white-space: normal;
  text-align: center;
}
.quote-commercial-applied {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-top: 9px;
  border-top: 1px solid var(--line);
}
.quote-commercial-reason {
  flex-basis: 100%;
  margin: 0;
  overflow-wrap: anywhere;
}
.quote-commercial-applied > span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 30px;
  padding: 4px 7px;
  border: 1px solid #cfe0ff;
  border-radius: 7px;
  background: #f5f9ff;
  color: var(--blue);
  font-size: 12px;
}
.quote-commercial-applied > span > .icon {
  width: 15px;
  height: 15px;
  color: var(--orange);
}
.quote-commercial-applied .btn {
  min-height: 22px;
  padding: 2px 4px;
  border: 0;
  background: transparent;
}
.shipping-estimate {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 5px 12px;
  margin: 12px 0 0;
  padding: 11px 12px;
  border: 1px solid #b8d3ff;
  border-radius: 8px;
  background: #f5f9ff;
  color: var(--blue);
}
.shipping-estimate small {
  grid-column: 1/-1;
  color: var(--muted);
  line-height: 1.4;
}
.commercial-settings-help {
  margin: 0 0 14px;
  padding: 11px 13px;
  border-left: 3px solid var(--orange);
  border-radius: 0 7px 7px 0;
  background: #fff7f2;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}
.commercial-settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}
.commercial-settings-grid > .card {
  min-width: 0;
}
.commercial-settings-grid .data-table {
  min-width: 640px;
}
.commercial-rule-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.commercial-rule-form > .full-width,
.commercial-rule-form > p,
.commercial-rule-form > footer {
  grid-column: 1/-1;
}
.commercial-rule-form > footer {
  display: flex;
  justify-content: flex-end;
  gap: 7px;
}
.customer-order-list td:first-child a {
  color: var(--navy);
  font-weight: 650;
  text-decoration: none;
}
.customer-order-list td:first-child a:hover {
  text-decoration: underline;
}
.customer-order-composition {
  min-width: 1240px;
}
.customer-order-composition th:nth-child(2) {
  min-width: 260px;
}
.customer-order-composition td:last-child {
  white-space: nowrap;
}
.order-line-link,
.btn.order-line-link {
  display: inline;
  padding: 0;
  border: 0;
  background: none;
  color: var(--navy);
  font-weight: 650;
  text-align: left;
  white-space: normal;
  text-decoration: none;
}
.order-line-link:hover {
  color: var(--orange);
  text-decoration: underline;
}
.customer-order-composition td .btn {
  width: auto;
  height: auto;
  min-height: 24px;
}
.customer-order-composition td .order-line-link {
  display: inline;
}
.customer-order-composition td:nth-child(3) {
  min-width: 0;
}
.customer-order-composition .order-progress-cell {
  min-width: 84px;
  white-space: nowrap;
}
.customer-order-composition .order-progress-cell small {
  display: block;
  color: var(--muted);
  font-size: 10px;
}
.customer-order-composition .order-progress-link {
  padding: 0;
  border: 0;
  background: none;
  color: var(--navy);
  font-weight: 650;
}
.customer-order-composition .order-progress-link:hover {
  color: var(--orange);
  text-decoration: underline;
}
.order-situation-toolbar {
  margin: 10px 0;
  gap: 8px;
}
.order-situation-toolbar label {
  display: flex;
  align-items: center;
  gap: 6px;
}
.order-situation-toolbar input {
  width: 142px;
  min-width: 0;
  padding: 5px 7px;
}
.order-situation-toolbar small {
  color: var(--muted);
}
.timesheet-heading .tabs button {
  flex: 0 0 auto;
  white-space: nowrap;
}
.dossier-contact-list {
  min-width: 760px;
}
.dossier-contact-list td:first-child {
  min-width: 180px;
}
.dossier-contact-primary {
  display: block;
  color: var(--muted);
  font-size: 10px;
}
.order-summary {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.order-total-card {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.order-total-card > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  color: var(--muted);
}
.order-total-card > div:last-child {
  padding-top: 9px;
  border-top: 1px solid var(--line);
  color: var(--navy);
  font-size: 16px;
}
.order-commercial-snapshot {
  display: grid;
  gap: 8px;
  padding: 12px;
}
.order-commercial-snapshot > div {
  display: grid;
  grid-template-columns: minmax(110px, 0.8fr) minmax(0, 1.2fr);
  gap: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}
.order-commercial-snapshot > div:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}
.order-commercial-snapshot span {
  color: var(--muted);
}
.order-commercial-snapshot strong {
  text-align: right;
  overflow-wrap: anywhere;
}
@media (max-width: 1100px) {
  body[data-view='quote'] .quote-commercial-totals {
    grid-template-columns: 1fr;
  }
  .quote-commercial-actions > div:first-of-type {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .commercial-settings-grid {
    grid-template-columns: 1fr;
  }
  .order-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 600px) {
  body[data-view='quote'] .quote-commercial-totals .quote-total-main {
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-areas: 'icon title' 'icon details' 'rounding rounding';
  }
  .quote-commercial-actions > div:first-of-type {
    grid-template-columns: 1fr;
  }
  .quote-commercial-actions > div:first-of-type > .btn {
    width: 100%;
  }
  .commercial-rule-form {
    grid-template-columns: 1fr;
  }
  .commercial-rule-form > .full-width,
  .commercial-rule-form > p,
  .commercial-rule-form > footer {
    grid-column: auto;
  }
  .commercial-rule-form > footer {
    align-items: stretch;
    flex-direction: column;
  }
  .commercial-rule-form > footer > .btn {
    width: 100%;
    justify-content: center;
  }
  .order-summary {
    grid-template-columns: 1fr;
  }
  .order-commercial-snapshot > div {
    grid-template-columns: 1fr;
  }
  .order-commercial-snapshot strong {
    text-align: left;
  }
}

.article-list-edit-hint {
  margin: 0 0 10px;
  color: #52699e;
  font-size: 12px;
  line-height: 1.45;
}
.collection-list-articles .article-list-derived-value {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  white-space: nowrap;
}
.collection-list-articles .article-list-derived-value small {
  color: #65769a;
  font-size: 10px;
}
.collection-list-articles .article-list-locked-value {
  display: inline-grid;
  max-width: 140px;
  gap: 2px;
  vertical-align: middle;
}
.collection-list-articles .article-list-locked-value > small {
  color: #65769a;
  font-size: 10px;
  line-height: 1.25;
  white-space: normal;
}
.collection-list-articles .article-list-inline-input,
.collection-list-articles .article-list-inline-select {
  box-sizing: border-box;
  width: 100%;
  min-width: 74px;
  max-width: 150px;
  min-height: 32px;
  padding: 5px 6px;
  border: 1px solid transparent;
  border-radius: 5px;
  background: transparent;
  color: var(--navy);
  font: inherit;
  font-variant-numeric: tabular-nums;
}
.collection-list-articles .article-list-inline-input {
  text-align: right;
  cursor: text;
}
.collection-list-articles .article-list-inline-select {
  max-width: 130px;
  cursor: pointer;
}
.collection-list-articles .article-list-inline-input:hover,
.collection-list-articles .article-list-inline-select:hover {
  border-color: #c9d5eb;
  background: #fff;
}
.collection-list-articles .article-list-inline-input:focus,
.collection-list-articles .article-list-inline-select:focus {
  border-color: var(--blue);
  background: #fff;
  outline: 2px solid color-mix(in srgb, var(--blue) 18%, transparent);
}
.collection-list-articles .article-list-inline-select option:disabled {
  color: #8996ac;
}
@media (max-width: 700px) {
  .collection-list-articles .article-list-inline-input,
  .collection-list-articles .article-list-inline-select {
    min-width: 68px;
    max-width: 112px;
  }
  .collection-list-articles .article-list-locked-value {
    max-width: 105px;
  }
  .article-list-edit-hint {
    margin-bottom: 8px;
  }
}
@media (max-width: 600px) {
  body[data-view='project'] .project-overview-grid,
  body[data-view='project'] .project-governance {
    grid-template-columns: minmax(0, 1fr);
  }
  .record-header-meta {
    flex-wrap: wrap;
    gap: 8px 16px;
  }
}

/* Signature en ligne du client : trace appose sur le contrat. */
.contract-signature-image {
  display: block;
  max-width: 220px;
  max-height: 92px;
  margin-top: 10px;
}
.contract-signature-meta {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}