:root {
  --bg: #f6f7f3;
  --ink: #17201c;
  --muted: #65706a;
  --line: #dfe4dc;
  --panel: #ffffff;
  --teal: #1266f1;
  --teal-dark: #08234a;
  --coral: #c9503f;
  --amber: #c5892d;
  --green: #0b4fb8;
  --soft-teal: #edf6ff;
  --soft-coral: #fae9e6;
  --shadow: 0 18px 45px rgba(24, 40, 34, 0.1);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  height: 100%;
  overflow: hidden;
}

body {
  margin: 0;
  height: 100vh;
  color: var(--ink);
  background: var(--bg);
  overflow: hidden;
}

.login-screen,
.signup-screen {
  position: relative;
  height: 100vh;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(420px, 0.72fr);
  background: #ffffff;
  overflow: hidden;
}

.login-screen::before,
.signup-screen::before {
  content: "";
  position: absolute;
  inset: -5%;
  background: url("../images/biopartner-hospital-hero.png") center right/cover no-repeat;
  transform: scale(1.02);
  animation: hospitalPhotoMove 22s ease-in-out infinite alternate;
  z-index: 0;
}

.login-screen::after,
.signup-screen::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0.9) 42%, rgba(255, 255, 255, 0.56) 68%, rgba(255, 255, 255, 0.18)),
    radial-gradient(circle at 12% 86%, rgba(12, 141, 155, 0.12), transparent 34%);
  z-index: 0;
}

.login-screen > *,
.signup-screen > * {
  position: relative;
  z-index: 1;
}

.login-hero,
.signup-hero {
  min-height: 0;
  height: 100vh;
  padding: clamp(18px, 3vw, 42px);
  color: #08234a;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 28px;
  position: relative;
}

.signup-brand span,
.signup-hero p,
.signup-stats span {
  color: #40576a;
}

.signup-brand {
  width: min(560px, 72vw);
  padding: 6px 8px;
  border-radius: 8px;
  background: transparent;
  border: 0;
  box-shadow: none;
  overflow: hidden;
}

.bioserv-logo-main {
  display: block;
  width: 100%;
  height: auto;
}

.signup-copy {
  max-width: 780px;
}

.signup-copy .eyebrow {
  color: #0c8d9b;
}

.signup-copy h1 {
  font-size: clamp(34px, 5vw, 68px);
  line-height: 0.98;
  margin-bottom: 22px;
  color: #08234a;
  text-transform: uppercase;
}

.signup-copy p {
  max-width: 680px;
  font-size: 17px;
  line-height: 1.65;
}

.login-side,
.signup-side {
  min-height: 0;
  height: 100vh;
  display: grid;
  align-items: center;
  padding: clamp(14px, 2.2vw, 28px);
  overflow: hidden;
}

.login-card {
  align-self: center;
  display: grid;
  gap: 13px;
  padding: clamp(18px, 2.4vw, 28px);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(242, 248, 247, 0.96));
  border: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow);
}

.login-card h2 {
  margin: 0;
  color: #053b78;
  font-size: clamp(24px, 3vw, 34px);
}

.login-card label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-weight: 760;
}

.already-client-button {
  position: relative;
  justify-self: start;
  min-height: 36px;
  padding: 0 16px;
  overflow: hidden;
  border-color: rgba(255, 255, 255, 0.68);
  background:
    linear-gradient(110deg, rgba(255, 255, 255, 0.32), transparent 26%, transparent 58%, rgba(255, 255, 255, 0.24)),
    linear-gradient(135deg, #0b5ce7, #23a8ff 48%, #1266f1);
  color: #fff;
  font-weight: 900;
  box-shadow: 0 12px 28px rgba(18, 102, 241, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.46);
}

.already-client-button::after {
  content: "";
  position: absolute;
  top: -40%;
  bottom: -40%;
  left: -52%;
  width: 34%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.72), transparent);
  transform: rotate(18deg);
  transition: left 420ms ease;
}

.already-client-button:hover {
  background:
    linear-gradient(110deg, rgba(255, 255, 255, 0.4), transparent 26%, transparent 58%, rgba(255, 255, 255, 0.26)),
    linear-gradient(135deg, #0a4fc7, #188fe2 48%, #08716d);
  border-color: rgba(255, 255, 255, 0.82);
  transform: translateY(-1px);
}

.already-client-button:hover::after {
  left: 118%;
}

.pricing-card {
  max-height: calc(100vh - 16px);
  padding: clamp(12px, 1.35vw, 18px);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(242, 248, 247, 0.96));
  border: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow);
  display: grid;
  gap: 9px;
}

.pricing-card h2 {
  font-size: clamp(19px, 2.1vw, 25px);
  line-height: 1.12;
  color: #053b78;
}

.pricing-intro {
  margin: -6px 0 0;
  color: var(--muted);
  line-height: 1.32;
  font-size: 13px;
}

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

.pricing-option {
  position: relative;
  display: grid;
  align-content: center;
  gap: 3px;
  min-height: 54px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7fbff;
  text-align: left;
  color: var(--ink);
}

.pricing-option small {
  width: fit-content;
  padding: 3px 7px;
  border-radius: 999px;
  background: #23a8ff;
  color: #fff;
  font-size: 10px;
  font-weight: 900;
}

.pricing-option strong,
.pricing-option span {
  display: block;
}

.pricing-option span {
  color: var(--muted);
}

.pricing-option.selected {
  border-color: #1266f1;
  background: #eaf4ff;
  box-shadow: 0 0 0 3px rgba(18, 102, 241, 0.12);
}

.pricing-option.recommended {
  border-color: #23a8ff;
}

.pricing-option.recommended:not(.selected) {
  border-color: var(--line);
  background: #f7fbff;
  box-shadow: none;
}

.pricing-navigation {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.plan-preview {
  display: grid;
  gap: 7px;
  padding: 10px;
  border-radius: 8px;
  background: linear-gradient(145deg, #073b78, #085db4);
  color: #fff;
  box-shadow: 0 18px 34px rgba(5, 59, 120, 0.22);
}

.plan-preview[data-plan="BioGrade"] {
  background:
    radial-gradient(circle at 88% 18%, rgba(102, 181, 45, 0.55), transparent 28%),
    linear-gradient(145deg, #073b78, #085db4);
}

.plan-preview[data-plan="BioExpert"] {
  background:
    radial-gradient(circle at 88% 18%, rgba(35, 168, 255, 0.5), transparent 28%),
    linear-gradient(145deg, #092d56, #1266f1);
}

.plan-preview-header {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 8px;
  align-items: center;
}

.plan-preview-header span {
  padding: 4px 8px;
  border-radius: 999px;
  background: #23a8ff;
  color: #fff;
  font-size: 11px;
  font-weight: 900;
}

.plan-preview-header strong {
  font-size: 19px;
}

.plan-preview-header em {
  font-style: normal;
  font-weight: 900;
  color: #b9f06e;
}

.plan-preview p {
  margin: 0;
  color: #dcecff;
  line-height: 1.25;
  font-size: 12px;
}

.plan-preview-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.plan-preview-metrics span {
  padding: 5px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
}

.plan-preview-metrics strong,
.plan-preview-metrics small {
  display: block;
}

.plan-preview-metrics small {
  color: #b7d8ff;
}

.plan-preview ul {
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.plan-preview li {
  position: relative;
  padding-left: 20px;
  color: #fff;
  font-weight: 720;
  font-size: 12px;
  line-height: 1.18;
}

.plan-preview li::before {
  content: "\2713";
  position: absolute;
  left: 0;
  top: 1px;
  width: 14px;
  height: 14px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #23a8ff;
  color: #fff;
  font-size: 10px;
  line-height: 1;
  font-weight: 900;
}

.plan-submit-button {
  min-height: 38px;
  background: linear-gradient(135deg, #1266f1, #23a8ff);
  border-color: #1266f1;
  font-weight: 900;
}

.demo-request-button {
  min-height: 34px;
  border-color: rgba(18, 102, 241, 0.42);
  background: rgba(234, 244, 255, 0.88);
  color: #053b78;
  font-weight: 850;
}

.demo-request-button:hover {
  border-color: #1266f1;
  background: #e0f0ff;
}

@media (max-height: 820px) {
  .signup-hero {
    gap: 14px;
  }

  .signup-brand {
    width: min(420px, 58vw);
  }

  .signup-copy h1 {
    font-size: clamp(28px, 4vw, 48px);
    margin-bottom: 12px;
  }

  .signup-copy p {
    font-size: 15px;
    line-height: 1.45;
  }

  .pricing-card {
    gap: 7px;
    padding: 12px;
  }

  .pricing-card h2 {
    font-size: 22px;
  }

  .pricing-intro {
    display: none;
  }

  .pricing-option {
    min-height: 48px;
  }

  .plan-preview p {
    display: none;
  }

  .plan-preview ul {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.signup-card {
  align-self: center;
  position: relative;
  padding: clamp(12px, 1.8vw, 20px);
  border-radius: 8px;
  background:
    radial-gradient(circle at 88% 0%, rgba(102, 181, 45, 0.22), transparent 28%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(234, 244, 255, 0.97));
  border: 1px solid rgba(18, 102, 241, 0.18);
  box-shadow: 0 18px 40px rgba(5, 59, 120, 0.18);
  display: grid;
  gap: 8px;
  max-height: calc(100vh - 16px);
  overflow: hidden;
}

.back-button {
  justify-self: start;
}

.signup-card-actions {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.admin-demo-button {
  white-space: nowrap;
}

.signup-card > .eyebrow,
.signup-card > h2 {
  display: none;
}

.selected-plan {
  margin: -8px 0 0;
  padding: 7px 10px;
  border-radius: 8px;
  background: #073b78;
  color: #fff;
  font-weight: 760;
  font-size: 13px;
}

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

.signup-step {
  min-height: 30px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 8px;
  color: #fff;
  font-size: 12px;
  font-weight: 780;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.24), 0 8px 16px rgba(5, 59, 120, 0.08);
}

.signup-step:nth-child(1) {
  background: linear-gradient(135deg, #1266f1, #22a8a0);
}

.signup-step:nth-child(2) {
  background: linear-gradient(135deg, #1266f1, #23a8ff);
}

.signup-step:nth-child(3) {
  background: linear-gradient(135deg, #6d5a96, #9b78d2);
}

.signup-step.active {
  border-color: #ffffff;
  color: #fff;
  box-shadow: 0 0 0 3px rgba(18, 102, 241, 0.16), 0 10px 22px rgba(18, 102, 241, 0.22);
  transform: translateY(-1px);
}

.signup-step.completed {
  border-color: #7be28a;
  background: linear-gradient(135deg, #0b5ce7, #23a8ff);
  color: #fff;
}

.signup-step.completed::after {
  content: "OK";
  margin-left: 4px;
  font-size: 10px;
  font-weight: 900;
}

.signup-pane {
  display: none;
  gap: 8px;
}

.signup-pane.active {
  display: grid;
}

.compact-plan-selector {
  grid-template-columns: 1fr;
}

.compact-plan-selector label {
  min-height: 46px;
  padding: 9px 11px;
}

.step-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  align-items: center;
}

.signup-card label {
  gap: 5px;
  font-size: 12px;
}

.signup-card input,
.signup-card select,
.signup-card textarea {
  min-height: 36px;
  padding: 8px 10px;
}

.signup-card .form-grid {
  gap: 8px;
}

.hospital-scene {
  position: relative;
  width: min(720px, 88%);
  height: clamp(210px, 30vh, 330px);
  margin: -12px 0 -2px;
  border-radius: 8px;
  overflow: hidden;
  background:
    radial-gradient(circle at 74% 20%, rgba(102, 181, 45, 0.24), transparent 24%),
    linear-gradient(180deg, rgba(239, 249, 255, 0.96), rgba(207, 233, 238, 0.9));
  border: 1px solid rgba(255, 255, 255, 0.48);
  box-shadow: 0 24px 58px rgba(2, 18, 47, 0.22);
}

.scene-skyline span,
.hospital-building,
.medical-device,
.walker,
.data-chip,
.path-line {
  position: absolute;
}

.scene-skyline span {
  bottom: 52px;
  width: 78px;
  height: 116px;
  border-radius: 8px 8px 0 0;
  background: rgba(5, 59, 120, 0.13);
}

.scene-skyline span:nth-child(1) {
  left: 28px;
  height: 86px;
}

.scene-skyline span:nth-child(2) {
  right: 34px;
  width: 96px;
  height: 132px;
}

.scene-skyline span:nth-child(3) {
  right: 148px;
  width: 62px;
  height: 96px;
}

.hospital-building {
  left: 50%;
  bottom: 46px;
  width: min(260px, 38vw);
  height: 175px;
  transform: translateX(-50%);
  border-radius: 14px 14px 0 0;
  background: linear-gradient(145deg, #ffffff, #e7f4f8);
  border: 1px solid rgba(5, 59, 120, 0.18);
  box-shadow: 0 20px 38px rgba(6, 38, 78, 0.18);
}

.hospital-roof {
  position: absolute;
  left: 18px;
  right: 18px;
  top: 14px;
  padding: 8px 10px;
  border-radius: 8px;
  background: #053b78;
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0;
  text-align: center;
}

.hospital-cross {
  position: absolute;
  top: 57px;
  left: 50%;
  width: 42px;
  height: 42px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: #23a8ff;
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 30px;
  font-weight: 950;
}

.window {
  position: absolute;
  width: 42px;
  height: 24px;
  border-radius: 6px;
  background: linear-gradient(135deg, #d8f3ff, #92d5e8);
  box-shadow: inset 0 0 0 1px rgba(5, 59, 120, 0.08);
  animation: windowGlow 4.6s ease-in-out infinite;
}

.w1 { left: 26px; top: 64px; }
.w2 { right: 26px; top: 64px; animation-delay: 0.7s; }
.w3 { left: 26px; top: 104px; animation-delay: 1.2s; }
.w4 { right: 26px; top: 104px; animation-delay: 1.8s; }

.door {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 48px;
  height: 48px;
  transform: translateX(-50%);
  border-radius: 10px 10px 0 0;
  background: linear-gradient(180deg, #1266f1, #053b78);
}

.path-line {
  left: 0;
  right: 0;
  bottom: 34px;
  height: 50px;
  background:
    linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.8), transparent),
    linear-gradient(180deg, rgba(255, 255, 255, 0.7), rgba(185, 213, 218, 0.9));
  clip-path: polygon(0 100%, 100% 100%, 61% 0, 43% 0);
}

.path-line::after {
  content: "";
  position: absolute;
  inset: 19px 0 auto;
  height: 3px;
  background: linear-gradient(90deg, transparent, rgba(102, 181, 45, 0.9), rgba(35, 168, 255, 0.85), transparent);
  transform: translateX(-100%);
  animation: pathSignal 4.8s ease-in-out infinite;
}

.walker {
  bottom: 64px;
  left: -58px;
  width: 32px;
  height: 58px;
  color: #053b78;
  opacity: 0;
  animation: walkToHospital 10.8s ease-in-out infinite;
}

.walker::before {
  content: "";
  position: absolute;
  left: 9px;
  top: 0;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: currentColor;
}

.walker span {
  position: absolute;
  left: 9px;
  top: 17px;
  width: 14px;
  height: 27px;
  border-radius: 10px 10px 6px 6px;
  background: linear-gradient(180deg, currentColor, rgba(5, 59, 120, 0.82));
}

.walker span::before,
.walker span::after {
  content: "";
  position: absolute;
  top: 25px;
  width: 5px;
  height: 16px;
  border-radius: 6px;
  background: currentColor;
  transform-origin: top;
}

.walker span::before {
  left: 1px;
  transform: rotate(6deg);
}

.walker span::after {
  right: 1px;
  transform: rotate(-6deg);
}

.walker::after {
  content: "";
  position: absolute;
  left: 3px;
  top: 22px;
  width: 8px;
  height: 22px;
  border-radius: 8px;
  border-left: 3px solid currentColor;
  opacity: 0.55;
  transform: rotate(18deg);
}

.walker-one {
  color: #053b78;
}

.walker-two {
  bottom: 58px;
  color: #1266f1;
  animation-delay: 2.6s;
  transform: scale(0.88);
}

.walker-three {
  bottom: 72px;
  color: #23a8ff;
  animation-delay: 5.2s;
  transform: scale(0.76);
}

.medical-device {
  bottom: 70px;
  width: 76px;
  height: 68px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid rgba(5, 59, 120, 0.16);
  box-shadow: 0 14px 28px rgba(5, 59, 120, 0.16);
}

.monitor-device {
  right: 56px;
  animation: deviceFloat 4.8s ease-in-out infinite;
}

.pump-device {
  left: 58px;
  width: 58px;
  height: 86px;
  animation: deviceFloat 5.4s ease-in-out infinite 0.8s;
}

.medical-device span {
  position: absolute;
  left: 10px;
  right: 10px;
  top: 10px;
  height: 28px;
  border-radius: 7px;
  background:
    linear-gradient(90deg, transparent 0 12%, #23a8ff 12% 16%, transparent 16% 30%, #23a8ff 30% 34%, transparent 34% 100%),
    #073b78;
}

.medical-device i {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  height: 8px;
  border-radius: 99px;
  background: #d9edf0;
  box-shadow: 0 -13px 0 #d9edf0;
}

.data-chip {
  padding: 7px 10px;
  border-radius: 999px;
  color: #053b78;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(5, 59, 120, 0.14);
  font-size: 12px;
  font-weight: 900;
  box-shadow: 0 12px 24px rgba(5, 59, 120, 0.12);
  animation: chipFloat 4.4s ease-in-out infinite;
}

.chip-one {
  left: 28px;
  top: 28px;
}

.chip-two {
  right: 28px;
  top: 38px;
  animation-delay: 0.7s;
}

.chip-three {
  right: 132px;
  bottom: 98px;
  animation-delay: 1.3s;
}

.signup-card label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-weight: 700;
}

.email-verify-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.plan-selector {
  border: 0;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.plan-selector legend {
  grid-column: 1 / -1;
  color: var(--muted);
  font-weight: 800;
  margin-bottom: 2px;
}

.plan-selector label {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7fbff;
}

.plan-selector input {
  width: auto;
  margin-top: 3px;
}

.plan-selector strong,
.plan-selector small {
  display: block;
}

.plan-selector small {
  color: var(--muted);
  margin-top: 3px;
}

.plan-selector label:has(input:checked) {
  border-color: #9fc5f2;
  background: var(--soft-teal);
  box-shadow: 0 0 0 3px rgba(11, 127, 122, 0.1);
}

.modal-plan-selector {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.verification-code {
  display: none;
}

.verification-code.visible {
  display: grid;
}

.password-setup {
  display: none;
  gap: 8px;
  padding: 10px;
  border-radius: 8px;
  background: rgba(234, 244, 255, 0.82);
  border: 1px solid rgba(18, 102, 241, 0.18);
}

.password-setup.visible {
  display: grid;
}

.app-hidden {
  display: none !important;
}

.success-text {
  color: var(--teal-dark);
}

.error-text {
  color: var(--coral);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

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

button {
  cursor: pointer;
}

.app-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  height: 100vh;
  overflow: hidden;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 24px;
  background: #08234a;
  color: #f5faf7;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.bioserv-logo {
  display: grid;
  color: #fff;
  line-height: 1;
}

.bioserv-logo strong {
  font-size: clamp(28px, 4vw, 54px);
  letter-spacing: 0;
  font-weight: 950;
}

.bioserv-logo small {
  color: #d6e6e1;
  font-size: 13px;
  font-weight: 850;
  text-transform: uppercase;
}

.app-logo strong {
  font-size: 24px;
}

.app-logo small {
  font-size: 10px;
}

.app-logo-image {
  width: 82px;
  height: auto;
  display: block;
  padding: 0;
  border-radius: 8px;
  background-color: transparent;
  box-shadow: none;
}

.brand-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--teal);
  font-weight: 800;
  font-size: 24px;
}

.brand strong,
.brand span {
  display: block;
}

.brand span {
  color: #b7c8c1;
  font-size: 14px;
}

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

.nav-item {
  border: 0;
  border-radius: 8px;
  color: #d8e4df;
  background: transparent;
  padding: 13px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
}

.nav-item span {
  width: 20px;
  text-align: center;
  color: #8ad2cc;
}

.nav-item:hover,
.nav-item.active {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.sidebar-card {
  margin-top: auto;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
}

.sidebar-card p {
  margin: 8px 0 0;
  color: #ccdad4;
  line-height: 1.5;
  font-size: 14px;
}

.main {
  height: 100vh;
  padding: 20px 24px;
  min-width: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.topbar,
.section-header,
.panel-header,
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
}

.topbar {
  margin-bottom: 12px;
  flex: 0 0 auto;
}

.eyebrow {
  display: block;
  color: var(--teal);
  font-weight: 760;
  letter-spacing: 0;
  text-transform: uppercase;
  font-size: 12px;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: 30px;
}

h2 {
  margin-bottom: 0;
  font-size: 28px;
}

h3 {
  margin-bottom: 10px;
}

.topbar-actions,
.filters,
menu {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.inbox-wrapper {
  position: relative;
}

.inbox-button {
  position: relative;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border: 1px solid #b9d8ed;
  border-radius: 8px;
  background: linear-gradient(135deg, #1266f1, #23a8ff);
  color: #fff;
  font-weight: 780;
  box-shadow: 0 12px 26px rgba(18, 102, 241, 0.22);
}

.inbox-icon {
  font-size: 15px;
}

.inbox-button strong {
  position: absolute;
  top: -8px;
  right: -8px;
  min-width: 21px;
  height: 21px;
  display: grid;
  place-items: center;
  padding: 0 5px;
  border: 2px solid #ffffff;
  border-radius: 999px;
  color: #fff;
  background: #dc2626;
  box-shadow: 0 5px 12px rgba(185, 28, 28, .28);
  font-size: 11px;
  line-height: 1;
}

.inbox-button strong.is-empty {
  display: none;
}

.inbox-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  z-index: 40;
  width: min(420px, calc(100vw - 34px));
  padding: 14px;
  border: 1px solid #c9ddf8;
  border-radius: 10px;
  background: #f7fbff;
  box-shadow: 0 24px 60px rgba(8, 49, 85, 0.22);
}

.inbox-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 12px;
  margin-bottom: 10px;
}

.inbox-panel-header h3 {
  margin-bottom: 0;
}

.inbox-list {
  display: grid;
  gap: 10px;
  max-height: 410px;
  overflow: auto;
}

.inbox-item {
  display: grid;
  gap: 5px;
  padding: 11px;
  border: 1px solid #d8e5f2;
  border-radius: 8px;
  background: #fff;
}

.inbox-item.unread {
  border-color: #1266f1;
  background: #edf5ff;
}

.inbox-item strong,
.inbox-item span {
  display: block;
}

.inbox-item span {
  color: var(--teal-dark);
  font-size: 12px;
  font-weight: 760;
}

.inbox-item p {
  margin-bottom: 3px;
  color: var(--muted);
  line-height: 1.4;
}

.tenant-select {
  min-height: 40px;
  width: auto;
  min-width: 230px;
  background: #fff;
}

.primary-button,
.ghost-button,
.outline-button,
.mini-button,
.chip,
.icon-button {
  border-radius: 8px;
  min-height: 40px;
  border: 1px solid transparent;
}

.primary-button {
  background: var(--teal);
  color: #fff;
  border-color: var(--teal);
  padding: 0 16px;
  font-weight: 720;
}

.primary-button:hover {
  background: var(--teal-dark);
}

.need-cta-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  overflow: visible;
  background: linear-gradient(135deg, #1266f1, #23a8ff);
  animation: needPulse 1.55s ease-in-out infinite;
  will-change: transform, box-shadow;
}

.need-cta-icon {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
  font-size: 20px;
  line-height: 1;
  animation: needPlusBounce 1.55s ease-in-out infinite;
}

.need-cta-text {
  position: relative;
  z-index: 1;
}

.need-cta-button::after {
  content: "";
  position: absolute;
  inset: -5px;
  border: 2px solid rgba(18, 102, 241, 0.42);
  border-radius: 10px;
  opacity: 0;
  animation: needRing 1.55s ease-in-out infinite;
}

@keyframes needPulse {
  0%, 100% {
    transform: translateY(0);
    box-shadow: 0 0 0 rgba(11, 127, 122, 0);
  }
  50% {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 14px 30px rgba(18, 102, 241, 0.34);
  }
}

@keyframes needPlusBounce {
  0%, 100% { transform: rotate(0deg) scale(1); }
  50% { transform: rotate(90deg) scale(1.12); }
}

@keyframes needRing {
  0% {
    transform: scale(0.98);
    opacity: 0;
  }
  45% {
    opacity: 1;
  }
  100% {
    transform: scale(1.08);
    opacity: 0;
  }
}

@keyframes heroBackgroundDrift {
  0% {
    background-position: 82% 16%, 72% 88%, center, 50% 50%;
    background-size: auto, auto, auto, 112% auto;
  }

  100% {
    background-position: 78% 20%, 75% 84%, center, 56% 48%;
    background-size: auto, auto, auto, 118% auto;
  }
}

@keyframes hospitalPhotoMove {
  0% {
    transform: scale(1.04) translate3d(-1.5%, 0, 0);
    filter: saturate(1.02) contrast(1.02);
  }

  100% {
    transform: scale(1.12) translate3d(2.5%, -1.5%, 0);
    filter: saturate(1.08) contrast(1.04);
  }
}

@keyframes walkToHospital {
  0% {
    left: -58px;
    opacity: 0;
  }

  14%,
  72% {
    opacity: 1;
  }

  100% {
    left: calc(50% - 24px);
    opacity: 0;
  }
}

@keyframes deviceFloat {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-9px);
  }
}

@keyframes chipFloat {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-7px);
  }
}

@keyframes windowGlow {
  0%,
  100% {
    filter: brightness(1);
  }

  50% {
    filter: brightness(1.18);
  }
}

@keyframes pathSignal {
  0%,
  18% {
    transform: translateX(-100%);
    opacity: 0;
  }

  35%,
  72% {
    opacity: 0.9;
  }

  100% {
    transform: translateX(100%);
    opacity: 0;
  }
}

.ghost-button,
.chip {
  background: #eef2ed;
  color: var(--ink);
  padding: 0 13px;
}

.chip.active,
.outline-button:hover {
  background: var(--soft-teal);
  border-color: #cfe1f5;
}

.filters .chip {
  color: #fff;
  border: 0;
}

.filter-all { background: #073b78; }
.filter-maintenance { background: #1266f1; }
.filter-achat { background: #c5892d; }
.filter-contrat { background: #4267b2; }
.filter-vigilance { background: #c9503f; }
.filter-audit { background: #0b4fb8; }
.filter-autres { background: #6d5a96; }

.filters .chip.active {
  color: #111827;
  box-shadow: 0 0 0 3px rgba(18, 102, 241, 0.18), 0 10px 22px rgba(7, 59, 120, 0.16);
  transform: translateY(-1px);
}

.outline-button,
.mini-button {
  background: #fff;
  border-color: var(--line);
  color: var(--teal-dark);
  padding: 0 13px;
  font-weight: 680;
}

.icon-button {
  width: 40px;
  background: #fff;
  border-color: var(--line);
  color: var(--teal);
  font-weight: 800;
}

.view {
  display: none;
}

.view.active {
  min-height: 0;
  display: flex;
  flex: 1;
  flex-direction: column;
  overflow-x: hidden;
  overflow-y: auto;
  padding-right: 4px;
  scrollbar-gutter: stable;
}

.view.active::-webkit-scrollbar {
  width: 10px;
}

.view.active::-webkit-scrollbar-track {
  background: #e7efec;
  border-radius: 999px;
}

.view.active::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #1266f1, #1b8f91);
  border: 2px solid #e7efec;
  border-radius: 999px;
}

.account-strip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  margin: 0 0 12px;
  padding: 10px 14px;
  border: 1px solid #d8e5f2;
  border-radius: 8px;
  background: #f7fbff;
}

.account-strip strong,
.account-strip small {
  display: block;
}

.account-strip small {
  margin-top: 3px;
  color: var(--muted);
}

.hero-band {
  min-height: 176px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  align-items: end;
  gap: 24px;
  padding: 22px;
  border-radius: 8px;
  color: #fff;
  background:
    linear-gradient(90deg, rgba(17, 35, 31, 0.92), rgba(17, 35, 31, 0.45)),
    url("https://images.unsplash.com/photo-1581093588401-fbb62a02f120?auto=format&fit=crop&w=1600&q=80") center/cover;
  box-shadow: var(--shadow);
}

.hero-band h2 {
  max-width: 760px;
  font-size: 30px;
  line-height: 1.05;
  margin-bottom: 16px;
}

.hero-band p {
  max-width: 680px;
  color: #dce8e3;
  line-height: 1.6;
  margin-bottom: 0;
}

.hero-band .eyebrow {
  color: #95ded8;
}

.hero-panel {
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.28);
  padding: 20px;
  backdrop-filter: blur(10px);
}

.hero-panel span,
.hero-panel small {
  color: #d9ebe7;
}

.hero-panel strong {
  display: block;
  font-size: 40px;
  line-height: 1;
  margin: 8px 0;
}

.metrics-grid,
.cards-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 16px;
  margin: 0;
}

.metric-card,
.panel,
.contract-card,
.table-panel,
.timeline article {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(24, 40, 34, 0.05);
}

.metric-card {
  min-height: 116px;
  padding: 14px;
}

#dash-indicators.active {
  flex: 1;
  display: flex;
  align-items: stretch;
}

#dash-indicators .metrics-grid {
  width: 100%;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-content: start;
}

#dash-actions.active,
#intervention-gantt.active,
#intervention-inventory.active,
#messages-thread.active,
#messages-alerts.active {
  flex: 1;
}

#intervention-inventory .table-panel,
#messages-alerts .table-panel {
  height: 100%;
}

.metric-card span,
.metric-card small,
.task-item span,
.contract-card p,
.supplier-list span,
.timeline p {
  color: var(--muted);
}

.catalogue-category-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.catalogue-category {
  min-height: 92px;
  display: grid;
  align-content: start;
  gap: 7px;
  padding: 13px;
  border: 1px solid #d8e5f2;
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff, #f7fbff);
  color: var(--ink);
  text-align: left;
  box-shadow: 0 10px 24px rgba(8, 49, 85, 0.06);
}

.catalogue-category strong,
.catalogue-category span {
  display: block;
}

.catalogue-category strong {
  color: var(--blue-dark);
}

.catalogue-category span {
  color: var(--muted);
  line-height: 1.35;
}

.catalogue-category.active {
  border-color: #1266f1;
  background: linear-gradient(135deg, #1266f1, #1b8f91);
  color: #fff;
  box-shadow: 0 16px 30px rgba(18, 102, 241, 0.24);
}

.catalogue-category.active strong,
.catalogue-category.active span {
  color: #fff;
}

.catalogue-table .table-row {
  grid-template-columns: minmax(240px, 1.35fr) minmax(190px, 1fr) minmax(180px, 0.9fr) 100px 96px;
  min-width: 920px;
}

.settings-admin-badge {
  display: grid;
  gap: 3px;
  padding: 10px 13px;
  border: 1px solid #b9d8ed;
  border-radius: 8px;
  background: linear-gradient(135deg, #edf5ff, #f7fbff);
  text-align: right;
}

.settings-admin-badge strong,
.settings-admin-badge span {
  display: block;
}

.settings-admin-badge strong {
  color: var(--blue-dark);
}

.settings-admin-badge span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 720;
}

.settings-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
  gap: 14px;
}

.settings-form {
  display: grid;
  gap: 13px;
}

.settings-form-panel input,
.settings-form-panel select {
  background: #f7fbff;
}

.settings-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.settings-summary-panel,
.admin-rights-grid,
.settings-mail-card {
  display: grid;
  gap: 12px;
}

.settings-mail-card,
.admin-rights-grid article {
  padding: 12px;
  border: 1px solid #d8e5f2;
  border-radius: 8px;
  background: #f7fbff;
}

.settings-mail-card strong,
.settings-mail-card span,
.admin-rights-grid strong,
.admin-rights-grid span {
  display: block;
}

.settings-mail-card strong,
.admin-rights-grid strong {
  color: var(--teal-dark);
}

.settings-mail-card span,
.admin-rights-grid span {
  margin-top: 5px;
  color: var(--muted);
  line-height: 1.45;
}

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

.settings-log-table .table-row {
  grid-template-columns: 150px 190px 190px minmax(280px, 1fr);
  min-width: 840px;
}

.metric-card strong {
  display: block;
  font-size: 28px;
  margin: 8px 0 3px;
}

.content-grid,
.supplier-layout,
.messages-layout,
.tenant-layout,
.inventory-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(320px, 0.75fr);
  gap: 16px;
}

.page-tabs {
  display: flex;
  gap: 8px;
  margin: 12px 0;
  flex: 0 0 auto;
}

.page-tab {
  min-height: 36px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  font-weight: 760;
}

.page-tab.active {
  border-color: #9fc5f2;
  background: var(--soft-teal);
  color: var(--teal-dark);
}

.establishment-tabs {
  position: sticky;
  top: 0;
  z-index: 5;
  margin: 12px 0 14px;
  padding: 8px;
  border: 1px solid #c9ddf8;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(18, 102, 241, 0.08), rgba(27, 143, 145, 0.1)),
    #f7fbff;
}

.establishment-tabs .page-tab {
  flex: 1;
  justify-content: center;
  min-height: 40px;
  border-color: transparent;
  background: #fff;
  color: #315f91;
  box-shadow: 0 8px 16px rgba(7, 59, 120, 0.08);
}

.establishment-tabs .page-tab.active {
  background: linear-gradient(135deg, #1266f1, #23a8ff);
  border-color: #1266f1;
  color: #fff;
  box-shadow: 0 12px 24px rgba(18, 102, 241, 0.24);
}

.tab-pane {
  display: none;
  min-height: 0;
  overflow: visible;
}

.tab-pane.active {
  display: block;
}

.charts-grid {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
}

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

.chart-card small,
.gantt-panel p {
  color: var(--muted);
}

.donut-chart {
  width: 158px;
  height: 158px;
  border-radius: 50%;
  background: conic-gradient(var(--teal) 0 68%, #e6ebe7 68% 100%);
  display: grid;
  place-items: center;
  position: relative;
}

.donut-chart::after {
  content: "";
  width: 104px;
  height: 104px;
  border-radius: 50%;
  background: #fff;
  position: absolute;
}

.donut-chart span {
  position: relative;
  z-index: 1;
  font-size: 30px;
  font-weight: 820;
}

.bar-chart {
  display: grid;
  gap: 12px;
}

.bar-chart span {
  min-height: 32px;
  display: flex;
  align-items: center;
  padding-left: 12px;
  border-radius: 8px;
  color: #fff;
  font-weight: 760;
  background:
    linear-gradient(90deg, var(--teal) var(--value), #edf2ef var(--value));
}

.panel,
.contract-card {
  padding: 16px;
}

.task-list,
.service-list,
.supplier-list,
.message-list,
.alert-rule-list,
.tenant-list,
.permission-list,
.preventive-list {
  display: grid;
  gap: 12px;
}

.task-item,
.supplier-list article,
.alert-rule-list article,
.tenant-card,
.permission-list article,
.preventive-list article {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.task-item strong,
.task-item span,
.supplier-list strong,
.supplier-list span,
.alert-rule-list strong,
.alert-rule-list span,
.tenant-card strong,
.tenant-card span,
.permission-list strong,
.permission-list span,
.preventive-list strong,
.preventive-list span {
  display: block;
}

.tenant-card.selected {
  border-color: #9cd1cb;
  background: var(--soft-teal);
}

.add-tenant-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-top: 12px;
  padding: 14px;
  border: 1px dashed #9fc5f2;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(18, 102, 241, 0.08), rgba(27, 143, 145, 0.11)),
    #f7fbff;
}

.add-tenant-card strong,
.add-tenant-card span {
  display: block;
}

.add-tenant-card strong {
  color: #053b78;
}

.add-tenant-card span {
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.4;
}

.tenant-card small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

.permission-table {
  display: grid;
  gap: 6px;
  overflow: auto;
}

.permission-row {
  display: grid;
  grid-template-columns: minmax(160px, 1.4fr) minmax(150px, 1.25fr) repeat(3, minmax(82px, .65fr));
  gap: 10px;
  align-items: center;
  min-width: 700px;
  padding: 10px 12px;
  border: 1px solid rgba(5, 73, 75, .14);
  border-radius: 6px;
  background: rgba(226, 246, 240, .72);
}

.permission-head {
  color: #0b4a86;
  background: rgba(193, 234, 224, .88);
}

.text-button {
  border: 0;
  padding: 4px 0;
  color: #0b4a86;
  background: transparent;
  font: inherit;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.text-button:hover {
  color: #1266f1;
}

.rights-grid-wrapper {
  overflow: auto;
}

.rights-grid {
  width: 100%;
  min-width: 980px;
  border-collapse: separate;
  border-spacing: 0 6px;
}

.rights-grid th,
.rights-grid td {
  padding: 9px 10px;
  text-align: center;
  background: rgba(226, 246, 240, .72);
}

.rights-grid th:first-child,
.rights-grid td:first-child {
  min-width: 180px;
  text-align: left;
}

.rights-grid th {
  color: #0b4a86;
  background: rgba(193, 234, 224, .88);
}

.rights-grid th small,
.rights-grid td small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
}

.rights-cell {
  min-width: 155px;
}

.rights-cell select {
  width: 100%;
  min-width: 155px;
  padding: 7px 8px;
  border: 1px solid rgba(5, 73, 75, .24);
  border-radius: 5px;
  color: #0b4a86;
  background: #f2fbf7;
  font: inherit;
  font-size: 12px;
}

.pending-requests {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.pending-requests article {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
}

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

.organization-document-card {
  padding: 14px;
  border: 1px solid #d8e5f2;
  border-radius: 8px;
  background: #f6faf8;
}

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

.organization-document-card h4 {
  margin: 0;
  color: #053b78;
}

.organization-document-card span,
.organization-document-list small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.organization-document-list {
  display: grid;
  gap: 7px;
  margin-top: 14px;
}

.organization-document-list a {
  padding: 9px;
  border: 1px solid rgba(5, 73, 75, .14);
  border-radius: 6px;
  color: #0b4a86;
  background: #ffffff;
  text-decoration: none;
}

.organization-document-list a:hover {
  border-color: #1266f1;
}

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

.permission-list article,
.preventive-list article {
  display: block;
}

.permission-list span,
.preventive-list span {
  color: var(--muted);
}

.account-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.account-summary-grid article {
  padding: 12px;
  border-radius: 8px;
  background: #f6faf8;
  border: 1px solid #d8e5f2;
}

.account-summary-grid span,
.account-summary-grid small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.account-summary-grid strong {
  display: block;
  margin: 5px 0 3px;
  color: #053b78;
}

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

.establishment-page {
  animation: softReveal 0.18s ease both;
}

.profile-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.profile-detail-card {
  padding: 14px;
  border: 1px solid #d8e7e3;
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(238, 248, 246, 0.92), rgba(255, 255, 255, 0.96));
}

.profile-detail-card h4 {
  margin: 7px 0 7px;
  color: #053b78;
  font-size: 18px;
}

.profile-detail-card p {
  margin-bottom: 10px;
  color: var(--muted);
  line-height: 1.45;
}

.pending-request-list {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.pending-request-list span {
  display: block;
  padding: 8px 10px;
  border-radius: 8px;
  background: #fff8eb;
  border: 1px solid #f0d6a3;
  color: #7a541d;
  font-size: 12px;
  font-weight: 760;
}

.mini-metrics {
  display: grid;
  gap: 7px;
}

.mini-metrics span {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid #d8e5f2;
  color: var(--muted);
  font-size: 12px;
}

.mini-metrics strong {
  color: #053b78;
}

.organization-type-note {
  display: grid;
  gap: 4px;
  margin-bottom: 10px;
  padding: 10px;
  border-radius: 8px;
  background: #f7fbff;
  border: 1px solid #d8e5f2;
}

.organization-type-note strong {
  color: #053b78;
}

.organization-type-note span {
  color: var(--muted);
  line-height: 1.35;
}

.account-tabs {
  margin: 10px 0 12px;
  padding: 6px;
  border-radius: 8px;
  background: #eaf4ff;
  border: 1px solid #c9ddf8;
}

.account-tabs .page-tab {
  flex: 1;
  min-height: 34px;
  justify-content: center;
  border-color: transparent;
  background: transparent;
  color: #315f91;
}

.account-tabs .page-tab.active {
  background: linear-gradient(135deg, #1266f1, #23a8ff);
  border-color: #1266f1;
  color: #fff;
  box-shadow: 0 8px 18px rgba(18, 102, 241, 0.22);
}

.compact-access-list {
  gap: 7px;
}

.compact-access-list article {
  min-height: 54px;
}

.account-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}

.account-access-grid {
  margin-top: 16px;
}

.access-list {
  display: grid;
  gap: 8px;
}

.access-list article {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 11px;
  border-radius: 8px;
  background: #f7fbff;
  border: 1px solid var(--line);
}

.access-list strong,
.access-list span {
  display: block;
}

.access-list span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
}

.collaborator-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.permissions-table {
  display: grid;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.permissions-row {
  display: grid;
  grid-template-columns: minmax(170px, 1.25fr) repeat(6, minmax(128px, 1fr));
  gap: 6px;
  align-items: center;
  min-width: 970px;
  padding: 8px;
  border-radius: 8px;
  background: #f7fbff;
  border: 1px solid #d8e5f2;
}

.permissions-row.head {
  background: #073b78;
  color: #fff;
  font-weight: 850;
}

.permissions-row strong {
  display: block;
  color: #053b78;
}

.permissions-row small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.permissions-row select {
  min-height: 34px;
  padding: 0 8px;
  border-radius: 8px;
  border-color: #d8e5f2;
  background: #f7fbff;
  color: #073b78;
  font-size: 12px;
  font-weight: 760;
}

.permissions-row select.locked-module,
.permissions-row select:disabled {
  border-color: #e5ded8;
  background: #f4f1ee;
  color: #8a6f5b;
  cursor: not-allowed;
}

.access-matrix {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 12px;
  border: 0;
  border-radius: 8px;
  background:
    radial-gradient(circle at 100% 0%, rgba(35, 168, 255, 0.14), transparent 28%),
    #f7fbff;
}

.access-matrix legend {
  color: var(--muted);
  font-weight: 850;
}

.access-matrix > .file-hint {
  margin: -4px 0 4px;
}

.access-matrix-row {
  display: grid;
  grid-template-columns: minmax(150px, 1.1fr) repeat(3, minmax(98px, 0.8fr));
  gap: 6px;
  align-items: center;
  padding: 7px;
  border-radius: 8px;
  background: #f7fbff;
  border: 1px solid #d8e5f2;
}

.access-matrix-row.head {
  background: linear-gradient(135deg, #073b78, #1266f1);
  color: #fff;
  font-size: 12px;
  font-weight: 850;
}

.access-matrix-row.head span {
  text-align: center;
}

.access-matrix-row.head span:first-child {
  text-align: left;
}

.access-matrix-row strong {
  color: #053b78;
}

.access-matrix-row label {
  min-height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 5px 7px;
  border-radius: 8px;
  background: #eef6f6;
  border: 1px solid #d8e5f2;
  color: #42666a;
  font-size: 12px;
  font-weight: 760;
}

.access-matrix-row input {
  width: auto;
}

.access-matrix-row label:has(input:checked) {
  background: #edf6ff;
  border-color: #7ebf88;
  color: #0b4fb8;
  box-shadow: inset 3px 0 0 #0b4fb8;
}

.access-matrix-row label:has(input:disabled) {
  opacity: 0.45;
}

.access-matrix-row.module-not-included {
  background: #f4f1ee;
  border-color: #e5ded8;
}

.access-matrix-row label.locked-module {
  background: #f4f1ee;
  border-color: #e5ded8;
  color: #8a6f5b;
}

mark,
.status {
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 760;
  white-space: nowrap;
}

.high mark,
.status.danger {
  color: #8d2f23;
  background: var(--soft-coral);
}

.medium mark,
.status.warning {
  color: #805516;
  background: #fff3da;
}

.low mark,
.status.neutral {
  color: #0b4a86;
  background: #edf6ff;
}

.status.active {
  color: #0b4fb8;
  background: #dff3e3;
}

.status.pending {
  color: #805516;
  background: #fff3da;
}

.service-list button {
  min-height: 48px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
  text-align: left;
  padding: 0 14px;
  color: var(--ink);
  font-weight: 700;
}

.service-detail-list {
  display: grid;
  gap: 10px;
}

.service-detail-list article {
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7fbff;
}

.service-detail-list strong,
.service-detail-list span {
  display: block;
}

.service-detail-list span {
  color: var(--muted);
  margin-top: 4px;
}

.section-header {
  margin-bottom: 12px;
  flex: 0 0 auto;
}

.needs-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 10px;
  margin-bottom: 10px;
}

.needs-layout {
  min-height: 0;
  display: block;
  gap: 12px;
  flex: 1;
  overflow: auto;
}

.need-row {
  cursor: pointer;
}

.need-row.selected {
  background: var(--soft-teal);
  box-shadow: inset 4px 0 0 var(--teal);
}

.need-detail {
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.need-detail h3 {
  margin-bottom: 12px;
}

.need-detail dl {
  display: grid;
  gap: 10px;
  margin: 0;
}

.need-detail div {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7fbff;
}

.need-detail dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.need-detail dd {
  margin: 3px 0 0;
  font-weight: 760;
}

.need-actions {
  display: grid;
  gap: 8px;
  margin-top: auto;
}

.table-panel {
  overflow: auto;
}

.table-row {
  display: grid;
  grid-template-columns: minmax(180px, 1.4fr) minmax(120px, 0.8fr) 120px minmax(150px, 1fr) 100px;
  gap: 16px;
  align-items: center;
  padding: 12px 14px;
  border-top: 1px solid var(--line);
}

.needs-table-wide .table-row {
  grid-template-columns: minmax(220px, 1.4fr) minmax(160px, 0.9fr) 120px minmax(150px, 1fr) 110px 220px;
  min-width: 1120px;
}

.table-filters {
  background: #f7fbff;
  padding-top: 8px;
  padding-bottom: 8px;
}

.table-filters input {
  min-height: 32px;
  padding: 0 8px;
  border-radius: 8px;
  border: 1px solid #d8e5f2;
  background: #f7fbff;
}

.row-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.compact-row-actions {
  align-items: center;
}

.context-message-button {
  border-color: #1266f1;
  background: #edf5ff;
  color: #0b4db3;
  font-weight: 780;
}

.context-message-button:hover {
  background: #1266f1;
  color: #fff;
}

.table-row:first-child {
  border-top: 0;
}

.table-head {
  background: #edf2ef;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

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

.contract-card {
  min-height: 160px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.contract-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, 0.85fr);
  gap: 14px;
  min-height: 0;
}

.contract-form-panel {
  display: grid;
  gap: 12px;
}

.checkbox-line {
  display: flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  padding: 9px 11px;
  border-radius: 8px;
  background: #f7fbff;
  border: 1px solid #d8e5f2;
}

.contract-list {
  display: grid;
  gap: 10px;
}

.contract-donut {
  background: conic-gradient(#1266f1 0 46%, #23a8ff 46% 80%, #f2b84b 80% 100%);
}

.vigilance-donut {
  background: conic-gradient(#c9503f 0 22%, #f2b84b 22% 66%, #1266f1 66% 100%);
}

.vigilance-table .table-row {
  grid-template-columns: minmax(220px, 1.3fr) minmax(170px, 1fr) 140px 120px minmax(120px, 0.8fr);
  min-width: 920px;
}

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

.contract-analysis-grid article,
.pe-form-preview {
  padding: 12px;
  border: 1px solid #d8e5f2;
  border-radius: 8px;
  background: #f7fbff;
}

.contract-analysis-grid strong,
.contract-analysis-grid span,
.pe-form-preview strong,
.pe-form-preview span {
  display: block;
}

.contract-analysis-grid span,
.pe-form-preview span {
  margin-top: 5px;
  color: var(--muted);
  line-height: 1.45;
}

.pe-invite-panel {
  display: grid;
  gap: 12px;
}

.pe-tracking-list {
  display: grid;
  gap: 10px;
}

.pe-tracking-list article {
  display: grid;
  grid-template-columns: minmax(150px, 0.9fr) minmax(0, 1.2fr) auto;
  gap: 10px;
  align-items: center;
  padding: 11px;
  border-radius: 8px;
  background: #f7fbff;
  border: 1px solid var(--line);
}

.pe-tracking-list strong,
.pe-tracking-list span {
  display: block;
}

.pe-tracking-list span {
  color: var(--muted);
}

.contract-card h3 {
  margin-top: 16px;
}

.contract-card button {
  margin-top: auto;
}

.timeline {
  display: grid;
  gap: 14px;
  max-width: 900px;
}

.conversation-panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: calc(100vh - 235px);
}

.message-list {
  align-content: start;
  flex: 1;
}

.message-item {
  max-width: 82%;
  padding: 11px 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
}

.message-item span {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 760;
}

.message-item p {
  margin-bottom: 0;
  line-height: 1.5;
}

.message-item.incoming {
  background: #f7faf7;
}

.message-item.outgoing {
  justify-self: end;
  background: var(--soft-teal);
  border-color: #cfe1f5;
}

.linked-item-card {
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 1px solid #cfe1f5;
  border-radius: 8px;
  background: #f7fbff;
}

.linked-item-card span,
.linked-item-card small {
  color: var(--muted);
}

.linked-item-card strong {
  color: var(--blue-dark);
}

.reply-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  margin-top: 16px;
}

.alert-rule-list article {
  display: block;
}

.alert-rule-list span {
  color: var(--muted);
}

.alert-table {
  margin-top: 16px;
}

.import-panel p {
  color: var(--muted);
  line-height: 1.55;
}

.upload-box {
  min-height: 156px;
  display: grid;
  place-items: center;
  gap: 8px;
  text-align: center;
  border: 1px dashed #9fc5f2;
  border-radius: 8px;
  background: #f3fbfa;
  padding: 22px;
}

.upload-box input {
  max-width: 290px;
}

.upload-box span,
.file-hint {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.inventory-table {
  margin-top: 0;
}

.gantt-panel {
  margin-top: 0;
  overflow-x: hidden;
}

.gantt-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 8px 0;
  flex-wrap: wrap;
}

.gantt-toolbar input {
  width: 120px;
}

.gantt-form {
  display: grid;
  grid-template-columns: minmax(220px, 1.2fr) minmax(200px, 1fr) 150px 150px auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7fbff;
}

.gantt-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-weight: 700;
}

.gantt {
  min-width: 0;
  display: grid;
  gap: 10px;
}

#ganttRows {
  display: grid;
  gap: 10px;
}

.gantt-head,
.gantt-row {
  display: grid;
  grid-template-columns: minmax(150px, 1.25fr) repeat(12, minmax(0, 1fr));
  gap: 4px;
  align-items: center;
}

.gantt-head span {
  padding: 9px 5px;
  border-radius: 8px;
  background: #edf2ef;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.gantt-head span:first-child {
  text-align: left;
}

.gantt-row strong {
  padding: 12px 0;
}

.gantt-track {
  grid-column: 2 / 14;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  min-height: 32px;
  border-radius: 8px;
  background: repeating-linear-gradient(90deg, #f5f8f6 0, #f5f8f6 calc(8.33% - 1px), #dde5df calc(8.33% - 1px), #dde5df 8.33%);
}

.gantt-bar {
  grid-column: var(--start) / span var(--span);
  align-self: center;
  min-height: 24px;
  display: flex;
  align-items: center;
  padding: 0 8px;
  border-radius: 8px;
  color: #fff;
  font-size: 12px;
  font-weight: 780;
}

.gantt-bar.done {
  background: var(--green);
}

.gantt-bar.active {
  background: var(--teal);
}

.gantt-bar.planned {
  background: var(--amber);
}

.gantt-bar.late {
  background: var(--coral);
}

.empty-state {
  padding: 18px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
}

.timeline article {
  padding: 20px;
  border-left: 5px solid var(--teal);
}

.timeline span {
  color: var(--teal);
  font-weight: 760;
  font-size: 13px;
}

.accent-panel {
  background: #08234a;
  color: #fff;
}

.accent-panel p {
  color: #cfe4de;
  line-height: 1.6;
}

.modal {
  width: min(620px, calc(100vw - 28px));
  border: 0;
  border-radius: 8px;
  padding: 0;
  box-shadow: var(--shadow);
}

#adminAccountModal,
.large-modal {
  width: min(1180px, calc(100vw - 28px));
}

#inventoryModal,
#organizationModal {
  width: min(1040px, calc(100vw - 28px));
}

#adminAccountModal form {
  background:
    radial-gradient(circle at 94% 0%, rgba(102, 181, 45, 0.16), transparent 24%),
    linear-gradient(180deg, #ffffff, #f1f8f7);
}

.need-modal {
  width: min(1380px, calc(100vw - 18px));
  max-height: calc(100vh - 18px);
  overflow: hidden;
}

.need-wizard {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(210px, .28fr) minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.need-form-area {
  min-width: 0;
  display: grid;
  gap: 8px;
}

.nav-item-locked {
  position: relative;
}

.nav-item-locked small {
  margin-left: auto;
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(18, 102, 241, 0.12);
  color: #0b4fb8;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.locked-module-view {
  align-items: center;
  justify-content: center;
}

.module-demo {
  width: min(1180px, 100%);
  min-height: min(720px, calc(100vh - 54px));
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  overflow: hidden;
  border: 1px solid #bdd5ef;
  border-radius: 18px;
  background: #f4f8fd;
  box-shadow: 0 24px 64px rgba(6, 42, 95, 0.18);
}

.module-demo-header,
.module-demo-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 22px;
  background: #fff;
}

.module-demo-header {
  border-bottom: 1px solid #d9e6f4;
}

.module-demo-header h2 {
  margin: 2px 0 0;
  color: #062a5f;
  font-size: 25px;
}

.demo-close-button {
  flex: 0 0 auto;
  background: #eaf3ff;
  color: #0b4fb8;
  font-size: 22px;
}

.demo-progress {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
  padding: 12px 18px;
  background: #eaf3ff;
  border-bottom: 1px solid #cfe0f2;
}

.demo-upgrade-button {
  background: #0a75c9;
  box-shadow: 0 8px 20px rgba(10, 117, 201, .22);
}

.demo-catalogue-match {
  display: grid;
  grid-template-columns: minmax(0, .9fr) 110px minmax(0, 1.25fr);
  gap: 18px;
  align-items: center;
  margin-top: 12px;
}

.demo-catalogue-match > section {
  padding: 20px;
  border: 1px solid #c9ddec;
  background: #ffffff;
}

.demo-catalogue-match > section > span {
  color: #648097;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.demo-catalogue-match > section > strong,
.demo-catalogue-match > section > small {
  display: block;
  margin-top: 7px;
}

.demo-match-flow {
  position: relative;
  display: grid;
  min-height: 130px;
  place-items: center;
}

.demo-match-flow::before,
.demo-match-flow::after {
  position: absolute;
  width: 100%;
  height: 2px;
  background: #65b8e8;
  content: "";
}

.demo-match-flow b {
  z-index: 1;
  padding: 8px 11px;
  border: 1px solid #1687c9;
  background: #e7f6fd;
  color: #075787;
  font-size: 12px;
}

.demo-match-flow i {
  position: absolute;
  z-index: 2;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #0b6fc2;
  animation: peMatchTravel 2s linear infinite;
}

.demo-match-flow i:nth-child(2) { animation-delay: .65s; }
.demo-match-flow i:nth-child(3) { animation-delay: 1.3s; }

.demo-match-results article {
  position: relative;
  margin-top: 10px;
  padding: 11px 56px 11px 12px;
  border: 1px solid #d9e5ee;
  background: #f6f9fc;
}

.demo-match-results article strong,
.demo-match-results article small {
  display: block;
}

.demo-match-results article mark {
  position: absolute;
  top: 50%;
  right: 10px;
  padding: 5px 7px;
  background: #dff5ea;
  color: #147247;
  font-weight: 800;
  transform: translateY(-50%);
}

.demo-catalogue-note {
  margin: 18px 0 0;
  padding: 13px 15px;
  border-left: 4px solid #0b6fc2;
  background: #eaf4fc;
  color: #315979;
  line-height: 1.5;
}

@keyframes peMatchTravel {
  from { left: 2px; opacity: 0; }
  12%, 85% { opacity: 1; }
  to { left: calc(100% - 8px); opacity: 0; }
}

.pe-discovery-page {
  width: min(1180px, 100%);
  min-height: min(700px, calc(100vh - 54px));
  padding: 28px;
  border: 1px solid #bfd5e8;
  background: #f5f9fc;
  box-shadow: 0 22px 55px rgba(7, 42, 92, .12);
}

.pe-discovery-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 235px;
  gap: 28px;
  align-items: start;
  padding-bottom: 22px;
  border-bottom: 1px solid #d5e2ed;
}

.pe-discovery-header h2 {
  margin: 5px 0 9px;
  color: #082f5e;
  font-size: clamp(32px, 4vw, 48px);
}

.pe-discovery-header p {
  max-width: 790px;
  margin: 0;
  color: #47657f;
  line-height: 1.55;
}

.pe-current-offer {
  padding: 16px;
  border: 1px solid #9fc8e6;
  background: #e7f4fc;
}

.pe-current-offer span,
.pe-current-offer strong,
.pe-current-offer small {
  display: block;
}

.pe-current-offer span {
  color: #5e7990;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.pe-current-offer strong {
  margin: 5px 0;
  color: #075b98;
  font-size: 24px;
}

.pe-discovery-flow {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-top: 22px;
}

.pe-discovery-flow article {
  min-height: 178px;
  padding: 15px;
  border: 1px solid #d4e1eb;
  background: #ffffff;
}

.pe-discovery-flow article.featured {
  border-color: #0b78bd;
  background: #e8f6fd;
  box-shadow: inset 0 4px #0b78bd;
}

.pe-discovery-flow article > span {
  color: #0b78bd;
  font-size: 12px;
  font-weight: 900;
}

.pe-discovery-flow strong,
.pe-discovery-flow p {
  display: block;
  margin-top: 10px;
}

.pe-discovery-flow p {
  color: #60778b;
  font-size: 13px;
  line-height: 1.45;
}

.pe-innovation-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.pe-innovation-grid article {
  padding: 15px;
  border-left: 4px solid #0b6fc2;
  background: #eaf1f7;
}

.pe-innovation-grid strong,
.pe-innovation-grid span {
  display: block;
}

.pe-innovation-grid span {
  margin-top: 6px;
  color: #60778b;
  font-size: 13px;
  line-height: 1.4;
}

.pe-discovery-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 20px;
}

@media (max-width: 900px) {
  .demo-catalogue-match,
  .pe-discovery-header {
    grid-template-columns: 1fr;
  }

  .demo-match-flow {
    min-height: 45px;
  }

  .pe-discovery-flow {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pe-innovation-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* Navigation laterale : les sous-menus repoussent les lignes sans recouvrir le pied. */
.sidebar {
  min-height: 0 !important;
  gap: 10px !important;
  overflow: hidden !important;
}

.sidebar .brand {
  flex: 0 0 auto !important;
}

.sidebar .nav-list {
  min-height: 0 !important;
  flex: 1 1 auto !important;
  align-content: start !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  padding: 2px 5px 12px 0 !important;
  scrollbar-gutter: stable;
}

.sidebar .nav-group,
.sidebar .nav-submenu {
  position: static !important;
  width: 100% !important;
}

.sidebar .nav-group.open {
  z-index: auto !important;
}

.sidebar .nav-group.open .nav-submenu {
  display: grid !important;
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
}

.sidebar .sidebar-actions {
  position: relative !important;
  bottom: auto !important;
  z-index: 40 !important;
  flex: 0 0 auto !important;
  margin-top: 0 !important;
  padding-top: 10px !important;
  border-top: 1px solid rgba(127, 211, 255, .16) !important;
  background: #061a38 !important;
  pointer-events: auto !important;
}

.sidebar .sidebar-actions button {
  position: relative !important;
  z-index: 41 !important;
  pointer-events: auto !important;
}

.sidebar .nav-list::-webkit-scrollbar {
  width: 6px;
}

.sidebar .nav-list::-webkit-scrollbar-thumb {
  border-radius: 6px;
  background: rgba(127, 211, 255, .32);
}

/* Priorité finale responsive : conserve le contenu sur toute la largeur. */
@media (max-width: 1100px) {
  .app-shell {
    display: block !important;
    grid-template-columns: none !important;
    width: 100vw !important;
    height: 100dvh !important;
    padding-top: 58px !important;
    overflow: hidden !important;
  }

  .mobile-app-bar {
    display: grid !important;
  }

  .app-shell > .sidebar {
    position: fixed !important;
    z-index: 8400 !important;
    top: 0 !important;
    right: auto !important;
    bottom: 0 !important;
    left: 0 !important;
    width: min(330px, 88vw) !important;
    max-width: 88vw !important;
    height: 100dvh !important;
    transform: translate3d(-105%, 0, 0) !important;
    transition: transform .24s ease !important;
  }

  .app-shell.mobile-menu-open > .sidebar {
    transform: translate3d(0, 0, 0) !important;
  }

  .app-shell > .sidebar .mobile-sidebar-heading {
    display: flex !important;
    flex: 0 0 auto !important;
  }

  .app-shell > .sidebar .brand {
    display: flex !important;
    width: 100% !important;
  }

  .app-shell > .sidebar .nav-list {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    width: 100% !important;
    min-height: 0 !important;
    align-content: start !important;
    gap: 5px !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
  }

  .app-shell > .sidebar .nav-item,
  .app-shell > .sidebar .nav-group,
  .app-shell > .sidebar .nav-group-toggle,
  .app-shell > .sidebar .nav-submenu {
    position: static !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  .app-shell > .sidebar .nav-item,
  .app-shell > .sidebar .nav-group-toggle {
    display: flex !important;
    min-height: 40px !important;
    padding: 9px 11px !important;
    align-items: center !important;
    justify-content: space-between !important;
    text-align: left !important;
  }

  .app-shell > .sidebar .nav-label {
    width: auto !important;
    min-width: 0 !important;
    color: inherit !important;
    background: transparent !important;
    text-align: left !important;
    white-space: normal !important;
  }

  .app-shell > .sidebar .nav-submenu {
    display: none !important;
    grid-template-columns: minmax(0, 1fr) !important;
    padding-left: 10px !important;
  }

  .app-shell > .sidebar .nav-group.open .nav-submenu {
    display: grid !important;
  }

  .app-shell > .sidebar .sidebar-actions {
    width: 100% !important;
    flex: 0 0 auto !important;
  }

  .app-shell > .main {
    width: 100vw !important;
    max-width: 100vw !important;
    height: calc(100dvh - 58px) !important;
    margin: 0 !important;
    padding: 10px 12px 14px !important;
  }

  .app-shell > .main > .view.active {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
  }

  .mobile-sidebar-backdrop {
    display: block !important;
    z-index: 8300 !important;
  }

  .metrics-grid,
  .cards-grid,
  #dash-indicators .metrics-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .content-grid,
  .supplier-layout,
  .messages-layout,
  .tenant-layout,
  .inventory-layout,
  .settings-layout,
  .contract-layout,
  .dashboard-detail-grid,
  .charts-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }
}

@media (max-width: 700px) {
  .app-shell > .main {
    padding: 8px !important;
  }

  .metrics-grid,
  .cards-grid,
  #dash-indicators .metrics-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }
}

/* Navigation responsive BioPartner */
.mobile-app-bar,
.mobile-sidebar-heading,
.mobile-sidebar-backdrop {
  display: none;
}

@media (max-width: 1100px) {
  html,
  body {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
  }

  body.mobile-navigation-open {
    touch-action: none;
  }

  .app-shell {
    position: relative;
    display: block !important;
    width: 100%;
    max-width: 100vw;
    height: 100dvh;
    padding-top: 58px;
    overflow: hidden;
  }

  .mobile-app-bar {
    position: fixed;
    z-index: 8200;
    top: 0;
    left: 0;
    right: 0;
    height: 58px;
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr) 44px;
    align-items: center;
    gap: 10px;
    padding: 7px 12px;
    border-bottom: 1px solid #c7daec;
    background: rgba(255, 255, 255, .98);
    box-shadow: 0 8px 24px rgba(8, 35, 74, .12);
  }

  .mobile-app-bar > div {
    min-width: 0;
    display: grid;
    gap: 1px;
    text-align: center;
  }

  .mobile-app-bar > div strong,
  .mobile-app-bar > div small {
    overflow: hidden;
    color: #08234a;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-app-bar > div strong {
    font-size: 15px;
  }

  .mobile-app-bar > div small {
    color: #637d96;
    font-size: 10px;
  }

  .mobile-menu-toggle {
    display: grid;
    grid-template-columns: 18px 1fr;
    grid-template-rows: repeat(3, 4px);
    align-items: center;
    gap: 2px 8px;
    min-height: 40px;
    padding: 7px 10px;
    border: 1px solid #b9d2ec;
    border-radius: 6px;
    background: #edf6ff;
    color: #0757a4;
  }

  .mobile-menu-toggle span {
    grid-column: 1;
    width: 18px;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
  }

  .mobile-menu-toggle strong {
    grid-column: 2;
    grid-row: 1 / 4;
    font-size: 12px;
  }

  .mobile-messages-button {
    position: relative;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 6px;
    background: linear-gradient(135deg, #0759a6, #0f9fc0);
    color: #fff;
    font-size: 19px;
  }

  .mobile-messages-button strong {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    display: grid;
    place-items: center;
    padding: 0 4px;
    border: 2px solid #fff;
    border-radius: 999px;
    background: #d8323c;
    color: #fff;
    font-size: 9px;
  }

  .sidebar {
    position: fixed !important;
    z-index: 8400 !important;
    top: 0 !important;
    left: 0;
    width: min(330px, 88vw) !important;
    max-width: 88vw;
    height: 100dvh !important;
    padding: 10px 14px 14px !important;
    transform: translateX(-105%);
    transition: transform .24s ease;
    box-shadow: 22px 0 55px rgba(3, 20, 43, .38) !important;
  }

  .mobile-menu-open .sidebar {
    transform: translateX(0);
  }

  .mobile-sidebar-heading {
    display: flex;
    min-height: 42px;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(127, 211, 255, .18);
    color: #fff;
  }

  .mobile-sidebar-heading strong {
    font-size: 12px;
    text-transform: uppercase;
  }

  .mobile-sidebar-heading button {
    width: 38px;
    height: 38px;
    border: 0;
    background: transparent;
    color: #fff;
    font-size: 27px;
  }

  .mobile-sidebar-backdrop {
    position: fixed;
    z-index: 8300;
    inset: 0;
    display: block;
    border: 0;
    background: rgba(3, 20, 43, .56);
    opacity: 0;
    visibility: hidden;
    transition: opacity .2s ease, visibility .2s ease;
  }

  .mobile-menu-open .mobile-sidebar-backdrop {
    opacity: 1;
    visibility: visible;
  }

  .main {
    width: 100% !important;
    max-width: 100vw;
    height: calc(100dvh - 58px) !important;
    padding: 10px 12px 14px !important;
    overflow: hidden;
  }

  .subscription-presentation-banner {
    position: fixed;
    z-index: 20;
    right: 12px;
    bottom: 12px;
    left: 12px;
    margin: 0 !important;
  }

  .view.active {
    width: 100%;
    max-width: 100%;
    padding-right: 0 !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    scrollbar-gutter: auto;
  }

  .topbar {
    width: 100%;
    margin-bottom: 7px !important;
  }

  .topbar-actions,
  .tenant-select {
    width: 100%;
    min-width: 0;
  }

  .section-header {
    position: relative !important;
    top: auto !important;
    min-height: 0;
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .section-header > div:first-child {
    min-width: 0;
    flex: 1 1 260px;
  }

  .section-header h2 {
    overflow-wrap: anywhere;
  }

  .section-header > button,
  .section-header > .primary-button,
  .section-header .messaging-header-actions {
    max-width: 100%;
  }

  .metrics-grid,
  .cards-grid,
  #dash-indicators .metrics-grid,
  .catalogue-category-grid,
  .contract-analysis-grid,
  .organization-document-grid,
  .admin-rights-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .content-grid,
  .supplier-layout,
  .messages-layout,
  .tenant-layout,
  .inventory-layout,
  .settings-layout,
  .contract-layout,
  .dashboard-detail-grid,
  .charts-grid {
    grid-template-columns: 1fr !important;
  }

  .page-tabs,
  .dashboard-module-tabs,
  .filters,
  .message-module-filters {
    max-width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap !important;
    padding-bottom: 5px;
    scrollbar-width: thin;
  }

  .page-tab,
  .filters .chip,
  .message-module-filters .chip {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .table-panel,
  .permissions-table,
  .rights-grid-wrapper,
  .pe-arbitrage-table-wrap,
  .catalogue-products-panel,
  .settings-log-table,
  .permission-table {
    width: 100%;
    max-width: 100%;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
  }

  .modal,
  dialog,
  .large-modal,
  #inventoryModal,
  #organizationModal,
  #adminAccountModal,
  .new-conversation-modal {
    width: calc(100vw - 18px) !important;
    max-width: calc(100vw - 18px) !important;
    max-height: calc(100dvh - 18px) !important;
    margin: auto;
  }

  .modal form,
  dialog form,
  .new-conversation-modal .modal-card {
    width: 100% !important;
    max-width: 100% !important;
    max-height: calc(100dvh - 18px) !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
  }

  .form-grid,
  .new-conversation-grid,
  .needs-toolbar,
  .catalogue-filter-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 700px) {
  .mobile-app-bar {
    grid-template-columns: 78px minmax(0, 1fr) 42px;
    padding-inline: 8px;
  }

  .mobile-menu-toggle {
    grid-template-columns: 18px 1fr;
    padding-inline: 8px;
  }

  .main {
    padding: 8px !important;
  }

  .section-header {
    display: grid !important;
    grid-template-columns: 1fr;
    gap: 9px !important;
  }

  .section-header > *,
  .section-header button,
  .section-header .primary-button,
  .messaging-header-actions,
  .messaging-header-actions .module-search {
    width: 100%;
    min-width: 0 !important;
  }

  .messaging-header-actions {
    display: grid !important;
    grid-template-columns: 1fr;
  }

  .metrics-grid,
  .cards-grid,
  #dash-indicators .metrics-grid,
  .catalogue-category-grid,
  .contract-analysis-grid,
  .organization-document-grid,
  .admin-rights-grid,
  .form-grid,
  .new-conversation-grid,
  .needs-toolbar,
  .catalogue-filter-bar,
  .plan-preview-metrics {
    grid-template-columns: 1fr !important;
  }

  .metric-card {
    min-height: 92px;
  }

  .account-strip,
  .add-tenant-card,
  .task-item,
  .tenant-card,
  .pending-requests article,
  .access-list article,
  .pe-tracking-list article,
  .current-offer-banner {
    align-items: flex-start !important;
    flex-direction: column !important;
  }

  .conversation-index-panel,
  .conversation-thread-panel {
    height: calc(100dvh - 155px) !important;
    min-height: 0 !important;
  }

  .conversation-thread-header {
    display: grid !important;
    grid-template-columns: auto minmax(0, 1fr);
  }

  .conversation-thread-header .conversation-status,
  .conversation-close-button {
    grid-column: 1 / -1;
  }

  .message-bubble {
    width: 92% !important;
  }

  .conversation-reply-form,
  .conversation-reply-actions {
    grid-template-columns: 1fr !important;
    align-items: stretch !important;
  }

  .conversation-reply-actions {
    display: grid !important;
  }

  .conversation-reply-actions > * {
    width: 100%;
  }

  .sidebar-actions .inbox-panel:not(.is-hidden) {
    width: calc(100vw - 16px) !important;
    max-height: calc(100dvh - 24px) !important;
  }

  .modal-header {
    align-items: flex-start;
  }
}

.admin-client-tools {
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-client-tools input {
  width: min(360px, 38vw);
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid #b9cee0;
  border-radius: 5px;
  background: #f5faff;
  color: #102d4c;
}

.admin-client-row > span:first-child small,
.need-row > strong small {
  display: block;
  margin-top: 4px;
}

.need-row > strong small {
  color: #52718c;
  font-size: 11px;
  font-weight: 700;
}

.admin-modules-group {
  border-top: 1px solid rgba(255, 255, 255, .12);
  border-bottom: 1px solid rgba(255, 255, 255, .12);
  padding: 4px 0;
}

@media (max-width: 900px) {
  .admin-client-tools {
    width: 100%;
    align-items: stretch;
    flex-direction: column;
  }

  .admin-client-tools input {
    width: 100%;
  }
}

.demo-progress button {
  position: relative;
  min-width: 0;
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  background: transparent;
  color: #647f9c;
  font-size: 12px;
  cursor: pointer;
}

.demo-progress button::after {
  content: "";
  position: absolute;
  left: 58%;
  right: -42%;
  top: 50%;
  height: 2px;
  background: #bfd2e7;
}

.demo-progress button:last-child::after {
  display: none;
}

.demo-progress button span {
  position: relative;
  z-index: 1;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #fff;
  border: 2px solid #acc4de;
  font-weight: 900;
}

.demo-progress button.active,
.demo-progress button.completed {
  color: #062a5f;
}

.demo-progress button.active span {
  border-color: #1266f1;
  background: #1266f1;
  color: #fff;
  animation: demoStepPulse 1.5s ease-in-out infinite;
}

.demo-progress button.completed span {
  border-color: #23a8ff;
  background: #dff3ff;
  color: #0b4fb8;
}

.demo-stage {
  position: relative;
  min-height: 430px;
  overflow: hidden;
  padding: 20px;
}

.demo-screen {
  position: absolute;
  inset: 20px;
  display: none;
  overflow: auto;
  border: 1px solid #d3e1ef;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(6, 42, 95, 0.09);
}

.demo-screen.active {
  display: block;
  animation: demoScreenIn 500ms ease both;
}

.demo-browser-bar {
  min-height: 46px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 16px;
  border-bottom: 1px solid #dce7f2;
  background: #f8fbff;
}

.demo-browser-bar > span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #9db5ce;
}

.demo-browser-bar > span:first-child { background: #ff786e; }
.demo-browser-bar > span:nth-child(2) { background: #ffbf47; }
.demo-browser-bar > span:nth-child(3) { background: #44c789; }
.demo-browser-bar strong { margin-left: 8px; color: #173e65; }

.demo-form-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  padding: 24px;
}

.demo-form-layout > div {
  display: grid;
  gap: 14px;
}

.demo-screen label {
  display: grid;
  gap: 6px;
  color: #355b7c;
  font-size: 12px;
  font-weight: 900;
}

.demo-screen input,
.demo-screen select {
  width: 100%;
  min-height: 42px;
  border: 1px solid #b9d1ea;
  border-radius: 7px;
  background: #eef6ff;
  color: #123047;
  padding: 0 12px;
  font-weight: 800;
}

.demo-mail-preview {
  margin: 0 24px 24px;
  padding: 18px;
  border-left: 4px solid #1266f1;
  background: #edf6ff;
}

.demo-mail-preview p {
  color: #496a89;
}

.demo-mail-preview button,
.demo-form-actions button {
  min-height: 38px;
  border: 0;
  border-radius: 7px;
  background: #1266f1;
  color: #fff;
  padding: 0 16px;
  font-weight: 900;
}

.demo-table {
  display: grid;
  padding: 18px;
  gap: 6px;
}

.demo-row {
  min-height: 54px;
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border: 1px solid #deebf6;
  border-radius: 7px;
  color: #365a78;
}

.demo-row.demo-head {
  min-height: 38px;
  border: 0;
  background: #062a5f;
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.demo-typing-row {
  overflow: hidden;
  animation: demoRowHighlight 2.2s ease-in-out infinite;
}

.demo-form-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 18px 18px;
  color: #4b718f;
  font-size: 12px;
  font-weight: 800;
}

.demo-kpis,
.demo-order-board {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 22px 22px 6px;
}

.demo-kpis article,
.demo-order-board article {
  display: grid;
  gap: 6px;
  padding: 16px;
  border: 1px solid #d6e5f4;
  border-radius: 10px;
  background: #f7fbff;
}

.demo-kpis span,
.demo-order-board span {
  color: #66839e;
  font-size: 12px;
  font-weight: 800;
}

.demo-kpis strong,
.demo-order-board strong {
  color: #062a5f;
  font-size: 27px;
}

.demo-arrival {
  animation: demoArrival 2.4s ease both infinite;
}

.demo-arrival.delay {
  animation-delay: 0.7s;
}

.demo-status,
.demo-approved {
  width: fit-content;
  padding: 5px 9px;
  border-radius: 999px;
  background: #dff8ea;
  color: #08743f;
  font-size: 11px;
  font-weight: 900;
}

.demo-arbitration {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 16px;
  padding: 20px;
}

.demo-arbitration aside {
  display: grid;
  align-content: start;
  gap: 7px;
  padding: 18px;
  border-radius: 10px;
  background: #062a5f;
  color: #fff;
}

.demo-arbitration aside span {
  margin-top: 10px;
  color: #bdd8f5;
  font-size: 11px;
  text-transform: uppercase;
}

.demo-arbitration aside strong {
  font-size: 21px;
}

.demo-arbitration .demo-blue {
  color: #51c8ff;
}

.demo-order-board {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.demo-order-board i {
  width: var(--progress);
  height: 5px;
  border-radius: 999px;
  background: #1266f1;
  animation: demoProgress 1.8s ease both;
}

.demo-timeline {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  padding: 38px 24px;
}

.demo-timeline span {
  position: relative;
  padding-top: 24px;
  color: #718ba4;
  text-align: center;
  font-size: 11px;
  font-weight: 900;
}

.demo-timeline span::before {
  content: "";
  position: absolute;
  top: 0;
  left: calc(50% - 7px);
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #bfd1e4;
  box-shadow: 0 0 0 5px #eef5fc;
}

.demo-timeline span::after {
  content: "";
  position: absolute;
  top: 6px;
  left: 55%;
  width: 90%;
  height: 2px;
  background: #cad9e7;
}

.demo-timeline span:last-child::after { display: none; }
.demo-timeline .done::before { background: #21a867; }
.demo-timeline .active::before { background: #1266f1; animation: demoStepPulse 1.3s infinite; }

.generic-demo-content {
  min-height: 370px;
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  align-items: center;
  gap: 30px;
  padding: 30px;
}

.generic-demo-content h3 {
  color: #062a5f;
  font-size: 28px;
}

.generic-demo-content p {
  color: #4f708c;
}

.demo-skeleton {
  display: grid;
  gap: 12px;
  margin-top: 22px;
}

.demo-skeleton i {
  height: 48px;
  border-radius: 8px;
  background: linear-gradient(90deg, #e6f0fa, #f8fbff, #e6f0fa);
  background-size: 220% 100%;
  animation: demoShimmer 2s linear infinite;
}

.demo-mapping-grid {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) 34px minmax(180px, 1fr);
  gap: 10px;
  align-items: center;
  padding: 28px;
}

.demo-mapping-grid span,
.demo-mapping-grid strong {
  min-height: 46px;
  display: flex;
  align-items: center;
  padding: 0 14px;
  border-radius: 8px;
}

.demo-mapping-grid span {
  border: 1px solid #c9dced;
  background: #f7fbff;
  color: #496b88;
}

.demo-mapping-grid strong {
  border: 1px solid #8ab7ec;
  background: #e8f3ff;
  color: #0b4fb8;
}

.demo-mapping-grid b {
  color: #1266f1;
  text-align: center;
  font-size: 20px;
  animation: demoMapping 1.4s ease-in-out infinite;
}

.demo-gantt {
  display: grid;
  grid-template-columns: 150px repeat(6, minmax(70px, 1fr));
  grid-auto-rows: 54px;
  gap: 1px;
  margin: 26px;
  overflow: auto;
  background: #dce8f4;
  border: 1px solid #dce8f4;
}

.demo-gantt > span {
  grid-row: 1;
  display: grid;
  place-items: center;
  background: #062a5f;
  color: #fff;
  font-size: 11px;
  font-weight: 900;
}

.demo-gantt > span:first-child {
  grid-column: 2;
}

.demo-gantt > strong {
  grid-column: calc(var(--start) + 1) / span var(--length);
  display: flex;
  align-items: center;
  padding: 0 14px;
  border-radius: 7px;
  background: linear-gradient(90deg, #1266f1, #23a8ff);
  color: #fff;
  font-size: 12px;
  animation: demoGantt 2s ease both;
}

.demo-gantt > strong:first-of-type { grid-row: 2; }
.demo-gantt > strong:last-of-type { grid-row: 3; }

.module-demo-footer {
  border-top: 1px solid #d9e6f4;
  color: #4e708e;
  font-size: 12px;
  font-weight: 900;
}

.module-demo-footer > div {
  display: flex;
  gap: 8px;
}

@keyframes demoScreenIn {
  from { opacity: 0; transform: translateX(24px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes demoStepPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(18, 102, 241, 0.3); }
  50% { box-shadow: 0 0 0 8px rgba(18, 102, 241, 0); }
}

@keyframes demoRowHighlight {
  0%, 100% { background: #fff; }
  50% { background: #eaf5ff; }
}

@keyframes demoArrival {
  0%, 18% { opacity: 0; transform: translateY(14px); }
  45%, 100% { opacity: 1; transform: translateY(0); }
}

@keyframes demoProgress {
  from { width: 0; }
}

@keyframes demoShimmer {
  to { background-position: -220% 0; }
}

@keyframes demoMapping {
  50% { transform: translateX(4px); }
}

@keyframes demoGantt {
  from { max-width: 0; opacity: 0; }
  to { max-width: 100%; opacity: 1; }
}

.locked-module-card {
  width: min(1120px, 100%);
  min-height: min(640px, calc(100vh - 80px));
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  align-items: center;
  gap: 34px;
  padding: 38px;
  border: 1px solid rgba(126, 178, 255, 0.28);
  border-radius: 22px;
  background:
    radial-gradient(circle at 18% 18%, rgba(35, 168, 255, 0.22), transparent 32%),
    linear-gradient(135deg, #ffffff 0%, #eef6ff 48%, #dcecff 100%);
  box-shadow: 0 24px 60px rgba(7, 42, 92, 0.14);
  overflow: hidden;
}

.locked-orbit {
  position: relative;
  width: 260px;
  height: 260px;
  margin: auto;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #062a5f, #0c7fd1);
  color: #fff;
  box-shadow: inset 0 0 0 18px rgba(255, 255, 255, 0.08), 0 24px 60px rgba(7, 42, 92, 0.24);
}

.locked-orbit strong {
  font-size: 58px;
  letter-spacing: 0;
}

.locked-orbit span {
  position: absolute;
  width: 30px;
  height: 30px;
  border-radius: 10px;
  background: #23a8ff;
  box-shadow: 0 10px 24px rgba(35, 168, 255, 0.34);
  animation: lockedFloat 4.5s ease-in-out infinite;
}

.locked-orbit span:nth-child(1) {
  top: 30px;
  right: 36px;
}

.locked-orbit span:nth-child(2) {
  bottom: 52px;
  left: 20px;
  animation-delay: 0.8s;
}

.locked-orbit span:nth-child(3) {
  right: 6px;
  bottom: 86px;
  animation-delay: 1.4s;
}

.locked-module-copy {
  display: grid;
  gap: 18px;
}

.locked-module-copy h2 {
  margin: 0;
  color: #062a5f;
  font-size: clamp(34px, 4vw, 56px);
}

.locked-module-copy p {
  max-width: 720px;
  margin: 0;
  color: #315679;
  font-weight: 700;
  line-height: 1.55;
}

.locked-offer-line {
  display: flex;
  width: fit-content;
  gap: 12px;
  align-items: center;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(18, 102, 241, 0.2);
}

.locked-offer-line span {
  color: #5b7894;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.locked-offer-line strong {
  color: #1266f1;
}

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

.locked-feature-grid article {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(126, 178, 255, 0.24);
}

.locked-feature-grid article span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #1266f1;
}

.locked-feature-grid strong {
  color: #123047;
}

.locked-upgrade-box,
.dashboard-locked-panel {
  border: 1px solid rgba(18, 102, 241, 0.2);
  background: rgba(255, 255, 255, 0.78);
  border-radius: 16px;
  padding: 16px;
}

.dashboard-locked-panel {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  align-items: center;
  gap: 18px;
}

.locked-mini-animation {
  position: relative;
  width: 98px;
  height: 98px;
  border-radius: 24px;
  background: linear-gradient(135deg, #062a5f, #1266f1);
}

.locked-mini-animation span {
  position: absolute;
  width: 22px;
  height: 22px;
  border-radius: 8px;
  background: #23a8ff;
  animation: lockedFloat 3.2s ease-in-out infinite;
}

.locked-mini-animation span:nth-child(1) { top: 16px; left: 18px; }
.locked-mini-animation span:nth-child(2) { right: 18px; top: 36px; animation-delay: 0.5s; }
.locked-mini-animation span:nth-child(3) { left: 38px; bottom: 14px; animation-delay: 1s; }

@keyframes lockedFloat {
  0%, 100% { transform: translateY(0) scale(1); opacity: 0.86; }
  50% { transform: translateY(-12px) scale(1.08); opacity: 1; }
}

@media (max-width: 980px) {
  .module-demo {
    min-height: auto;
  }

  .demo-progress {
    grid-template-columns: 1fr;
  }

  .demo-progress button {
    min-height: 40px;
    justify-content: flex-start;
  }

  .demo-progress button::after {
    display: none;
  }

  .demo-stage {
    min-height: 520px;
  }

  .demo-form-layout,
  .demo-arbitration,
  .generic-demo-content {
    grid-template-columns: 1fr;
  }

  .demo-kpis,
  .demo-order-board {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .demo-row {
    grid-template-columns: 1.3fr repeat(3, minmax(80px, 1fr));
    min-width: 660px;
  }

  .locked-module-card {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 24px;
  }

  .locked-orbit {
    width: 180px;
    height: 180px;
  }

  .locked-feature-grid,
  .dashboard-locked-panel {
    grid-template-columns: 1fr;
  }
}

.summary-change-button {
  position: relative;
  min-height: 34px;
  overflow: visible;
  border-color: #1266f1;
  background: linear-gradient(135deg, #1266f1, #23a8ff);
  color: #fff;
  font-weight: 900;
  animation: needPulse 1.55s ease-in-out infinite;
  box-shadow: 0 8px 18px rgba(18, 102, 241, 0.24);
}

.summary-change-button:hover {
  background: linear-gradient(135deg, #0f57cf, #168ce0);
}

.summary-change-button::after {
  content: "";
  position: absolute;
  inset: -4px;
  border: 2px solid rgba(18, 102, 241, 0.38);
  border-radius: 10px;
  opacity: 0;
  animation: needRing 1.55s ease-in-out infinite;
}

.need-form-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 6px 0;
}

.need-form-tab {
  min-height: 30px;
  border: 1px solid #bfd2d8;
  border-radius: 8px;
  background: #eef6f6;
  color: #42666a;
  font-size: 12px;
  font-weight: 800;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.need-form-tab.active {
  border-color: var(--need-border, #cfe1f5);
  background: var(--need-soft, var(--soft-teal));
  color: var(--need-color, var(--teal));
  transform: translateY(-1px);
}

.need-form-tab.completed {
  border-color: #9fc5f2;
  background: #edf6ff;
  color: #0b4fb8;
}

.need-form-tab.completed::after {
  content: "OK";
  display: inline-grid;
  place-items: center;
  min-width: 24px;
  height: 16px;
  margin-left: 6px;
  border-radius: 999px;
  background: #0b4fb8;
  color: #fff;
  font-size: 10px;
  font-weight: 900;
}

.need-pane {
  display: none;
  gap: 10px;
}

.need-pane.active {
  display: grid;
}

.need-category-step {
  display: grid;
  gap: 16px;
}

.need-category-header {
  padding: 12px;
  border-radius: 8px;
  background: #08234a;
  color: #fff;
}

.need-category-header h3 {
  margin-bottom: 5px;
}

.need-category-header p {
  margin-bottom: 0;
  color: #cfe4de;
}

.need-type-picker {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  align-content: start;
}

.need-type-card {
  min-height: 118px;
  display: grid;
  place-items: center;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7fbff;
  color: var(--ink);
  font-weight: 800;
  text-align: center;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.need-type-card span {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  font-size: 24px;
  background: rgba(255, 255, 255, 0.62);
}

.need-type-card small {
  color: rgba(23, 32, 28, 0.7);
  font-weight: 650;
}

.need-type-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 28px rgba(24, 40, 34, 0.12);
}

.need-type-card.active {
  border-color: transparent;
  color: #111827;
  box-shadow: 0 18px 34px rgba(24, 40, 34, 0.16);
}

.need-type-card.active strong,
.need-type-card.active small {
  color: #111827;
}

.need-type-card.maintenance {
  background: linear-gradient(135deg, #edf6ff, #bfe8e2);
}

.need-type-card.purchase {
  background: linear-gradient(135deg, #fff2d7, #ffd28b);
}

.need-type-card.vigilance {
  background: linear-gradient(135deg, #fae9e6, #f3a092);
}

.need-type-card.contract {
  background: linear-gradient(135deg, #e9eefb, #aebfed);
}

.need-type-card.audit {
  background: linear-gradient(135deg, #edf6ff, #aedbb5);
}

.need-type-card.other {
  background: linear-gradient(135deg, #f0eef5, #d0c5e1);
}

.selected-need-type {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 9px;
  border-radius: 8px;
  background: var(--need-soft, var(--soft-teal));
  border: 1px solid var(--need-border, #cfe1f5);
  box-shadow: inset 5px 0 0 var(--need-color, var(--teal)), 0 10px 24px rgba(24, 40, 34, 0.08);
}

.selected-need-type > span {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #fff;
  font-size: 18px;
}

.selected-need-type div {
  flex: 1;
}

.selected-need-type strong,
.selected-need-type small {
  display: block;
}

.selected-need-type small {
  color: var(--muted);
}

.need-form-main {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.need-form-section {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid #6d9d8f;
  border-radius: 8px;
  background: #c7ddd6;
  box-shadow: inset 4px 0 0 var(--need-color, var(--teal));
}

.need-form-section label {
  color: #163f3c;
  font-size: 13px;
  font-weight: 780;
}

.section-mini-title {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--ink);
}

.section-mini-title span {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--need-soft, var(--soft-teal));
  color: var(--need-color, var(--teal));
  font-size: 12px;
  font-weight: 900;
}

.section-mini-title strong {
  font-size: 12px;
}

.field-group-title {
  width: fit-content;
  padding: 3px 8px;
  border-radius: 999px;
  background: #dcefeb;
  color: #08234a;
  border: 1px solid #cfe1f5;
  font-size: 10px;
  font-weight: 900;
}

.need-guidance {
  display: grid;
  gap: 3px;
  padding: 9px 10px;
  border-radius: 8px;
  background: var(--need-color, #08234a);
  color: #fff;
}

.need-guidance span {
  color: #cfe4de;
}

.maintenance-fields {
  display: grid;
  gap: 7px;
  padding: 0;
  border: 0;
  background: transparent;
}

.typed-need-fields {
  display: grid;
  gap: 8px;
  padding: 8px;
  border-radius: 8px;
  background: #dbece5;
  border: 1px solid #94b8aa;
}

.typed-need-fields select[multiple] {
  min-height: 118px;
  padding: 8px;
}

.selected-equipment-box,
.message-thread-preview,
.mapping-panel {
  display: grid;
  gap: 8px;
  padding: 10px;
  border-radius: 8px;
  background: #f7fbff;
  border: 1px solid #d8e5f2;
  color: #42666a;
  font-size: 13px;
}

.need-progress-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.status-action {
  min-height: 38px;
  border: 0;
  border-radius: 8px;
  color: #fff;
  font-weight: 850;
}

.status-action.accept { background: #1266f1; }
.status-action.start { background: #c5892d; }
.status-action.done { background: #0b4fb8; }
.status-action.close { background: #08234a; }

.need-overview-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.need-overview-grid article {
  padding: 10px;
  border-radius: 8px;
  background: #f7fbff;
  border: 1px solid #d8e5f2;
}

.need-overview-grid span,
.need-overview-grid strong,
.attachments-list strong {
  display: block;
}

.need-overview-grid span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.attachments-list {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 10px;
  border-radius: 8px;
  background: #f7fbff;
  border: 1px solid var(--line);
}

.inventory-picker-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  margin: 10px 0;
  align-items: center;
}

.inventory-picker-table {
  display: grid;
  gap: 6px;
  max-height: min(58vh, 560px);
  overflow: auto;
}

.inventory-picker-row {
  display: grid;
  grid-template-columns: 34px minmax(100px, 0.7fr) minmax(150px, 1.1fr) minmax(100px, 0.8fr) minmax(120px, 0.8fr) minmax(130px, 0.8fr) minmax(120px, 0.8fr);
  gap: 8px;
  align-items: center;
  padding: 8px;
  border: 1px solid #d8e5f2;
  border-radius: 8px;
  background: #f7fbff;
}

.inventory-picker-row.head {
  background: #073b78;
  color: #fff;
  font-weight: 850;
}

.compact-picker .inventory-picker-row,
.inventory-preview .inventory-picker-row {
  grid-template-columns: minmax(110px, 0.8fr) minmax(160px, 1fr) minmax(130px, 0.8fr) minmax(130px, 0.8fr) minmax(130px, 0.8fr);
}

.mapping-grid {
  display: grid;
  grid-template-columns: minmax(160px, 0.8fr) minmax(180px, 1fr);
  gap: 8px;
  align-items: center;
}

.mapping-grid > span {
  font-weight: 850;
  color: #053b78;
}

.revision-plan-list {
  display: grid;
  gap: 10px;
}

.revision-plan-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7fbff;
}

.revision-plan-card strong,
.revision-plan-card span {
  display: block;
}

.revision-plan-card span {
  margin-top: 4px;
  color: var(--muted);
}

.revision-device-table {
  display: grid;
  gap: 6px;
  overflow-x: auto;
}

.revision-device-row {
  display: grid;
  grid-template-columns: minmax(230px, 1.2fr) 140px 150px 150px minmax(220px, 1fr) 170px;
  gap: 8px;
  align-items: center;
  min-width: 1120px;
  padding: 8px;
  border-radius: 8px;
  background: #f7fbff;
  border: 1px solid #d8e5f2;
}

.revision-device-row.head {
  background: #073b78;
  color: #fff;
  font-weight: 850;
}

.maintenance-scope {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
}

.maintenance-scope label {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 34px;
  padding: 6px 8px;
  border-radius: 7px;
  background: #eef6f6;
  border: 1px solid #bfd2d8;
  color: #42666a;
  font-size: 13px;
  font-weight: 780;
  line-height: 1.15;
  box-shadow: 0 2px 6px rgba(24, 40, 34, 0.035);
}

.maintenance-scope input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.maintenance-scope label:has(input:checked) {
  background: #edf6ff;
  border-color: #9fc5f2;
  color: #111827;
  box-shadow: inset 3px 0 0 #0b4fb8, 0 4px 10px rgba(47, 105, 56, 0.1);
}

.maintenance-scope label.is-selected {
  background: #dceeff !important;
  border-color: #1266f1 !important;
  color: #082a59 !important;
  box-shadow: inset 3px 0 0 #1266f1, 0 5px 12px rgba(18, 102, 241, .14) !important;
}

.maintenance-scope label:has(input:checked)::after {
  content: "\2713";
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #0b4fb8;
  color: #fff;
  font-size: 12px;
}

.maintenance-scope label.is-selected::after {
  content: "\2713";
  display: grid;
  width: 18px;
  height: 18px;
  min-width: 18px;
  border-radius: 50%;
  place-items: center;
  background: #1266f1;
  color: #ffffff;
  font-size: 11px;
  font-weight: 900;
}

.maintenance-scope-panel {
  display: block;
  padding: 8px;
  border-radius: 8px;
  background: #dbece5;
  border: 1px solid #94b8aa;
}

.option-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 5px;
}

.option-grid label {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 22px;
  padding: 3px 6px;
  border-radius: 7px;
  background: #eef6f6;
  border: 1px solid #bfd2d8;
  color: #42666a;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.15;
  box-shadow: 0 2px 6px rgba(24, 40, 34, 0.035);
}

.option-grid input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.option-grid label:has(input:checked) {
  background: #edf6ff;
  border-color: #9fc5f2;
  color: #0b4fb8;
  box-shadow: inset 3px 0 0 #0b4fb8, 0 4px 10px rgba(47, 105, 56, 0.1);
}

.option-grid label:has(input:checked)::after {
  content: "\2713";
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #0b4fb8;
  color: #fff;
  font-size: 11px;
}

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

.maintenance-scope label:has(input:checked)::after,
.option-grid label:has(input:checked)::after {
  content: "";
  width: 7px;
  height: 7px;
  min-width: 7px;
  border-radius: 999px;
  background: #0b4fb8;
  font-size: 0;
  font-weight: 900;
}

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

.need-modal textarea {
  min-height: 74px;
}

.need-modal input,
.need-modal select,
.need-modal textarea {
  padding: 8px 10px;
  background: #f0fff8;
  border-color: #3f8f7d;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), 0 0 0 2px rgba(11, 127, 122, 0.08);
}

.need-single-page {
  gap: 10px;
}

.need-single-page .need-pane {
  display: grid;
}

.need-side-panel {
  position: sticky;
  top: 0;
  display: grid;
  gap: 9px;
  padding: 12px;
  border: 1px solid #83b7ab;
  border-radius: 8px;
  background: #dcefeb;
}

.need-side-panel-header {
  display: grid;
  gap: 3px;
  margin-bottom: 2px;
}

.need-side-panel-header strong {
  color: #053b78;
  font-size: 18px;
}

.need-side-panel label {
  color: #163f3c;
  font-size: 12px;
  font-weight: 780;
}

.need-files-field {
  position: relative;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 5px;
  min-height: 94px;
  padding: 10px;
  border: 1px dashed #3f8f7d;
  border-radius: 8px;
  background: #e5f5ee;
  color: #0b4a86;
  text-align: center;
  cursor: pointer;
}

.need-files-field input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.need-files-field strong {
  padding: 8px 11px;
  border-radius: 6px;
  color: #ffffff;
  background: #0b4a86;
}

.need-files-field:hover strong {
  background: #1266f1;
}

.need-modal .checkbox-row {
  padding: 9px;
  gap: 6px;
}

.need-identification-grid .wide-field {
  grid-column: 1 / -1;
}

.need-modal menu {
  margin-top: 0;
}

.need-modal-footer {
  justify-content: flex-start;
}

.need-form-feedback {
  min-height: 20px;
  margin: 4px 0 0;
  color: #0c5fad;
  font-size: 13px;
  font-weight: 700;
}

.need-form-feedback.error {
  padding: 9px 11px;
  border: 1px solid #ef9aa3;
  border-radius: 6px;
  background: #fff0f2;
  color: #a51f2c;
}

.need-quota-modal {
  width: min(620px, calc(100vw - 32px));
  max-width: none;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
}

.need-quota-modal::backdrop {
  background: rgba(4, 22, 48, .68);
  backdrop-filter: blur(4px);
}

.need-quota-card {
  display: grid;
  gap: 14px;
  padding: 28px;
  border: 1px solid #bcd4e8;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 28px 70px rgba(4, 28, 60, .28);
  text-align: center;
}

.need-quota-card h2,
.need-quota-card p {
  margin: 0;
}

.need-quota-card h2 {
  color: #082a59;
  font-size: 24px;
}

.need-quota-card p {
  color: #526b82;
  line-height: 1.55;
}

.need-quota-icon {
  display: grid;
  width: 52px;
  height: 52px;
  margin: 0 auto;
  border-radius: 50%;
  place-items: center;
  background: #0c5fad;
  color: #ffffff;
  font-size: 25px;
  font-weight: 900;
}

.need-quota-counters {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.need-quota-counters article {
  display: grid;
  gap: 5px;
  padding: 17px;
  border: 1px solid #cfe1f5;
  border-radius: 7px;
  background: #edf6ff;
}

.need-quota-counters span,
.need-quota-counters small {
  color: #526b82;
}

.need-quota-counters strong {
  color: #082a59;
  font-size: 24px;
}

.need-quota-counters b {
  color: #0c69bd;
}

@media (max-width: 560px) {
  .need-quota-card {
    padding: 22px 16px;
  }

  .need-quota-counters {
    grid-template-columns: 1fr;
  }
}

.modal::backdrop {
  background: rgba(14, 28, 24, 0.55);
}

.modal form {
  padding: 22px;
  display: grid;
  gap: 16px;
}

.need-modal form {
  max-height: calc(100vh - 18px);
  overflow-y: auto;
  overflow-x: hidden;
  gap: 8px;
  padding: 14px;
  background: #bfd4cc;
}

body:has(dialog[open]) .view.active {
  overflow: hidden;
}

.pe-preview-modal,
.pe-public-modal {
  max-height: calc(100vh - 28px);
  overflow: hidden;
}

.pe-preview-modal form,
.pe-public-modal form {
  max-height: calc(100vh - 28px);
  overflow-y: auto;
  overflow-x: hidden;
  background: #eef7f5;
}

.pe-email-preview {
  display: grid;
  gap: 14px;
  max-width: 760px;
  margin: 0 auto;
  padding: 22px;
  border: 1px solid #cfe1f5;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 14px 30px rgba(5, 59, 120, 0.1);
}

.pe-email-preview-head,
.pe-public-intro {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid #cde4e0;
}

.pe-email-preview-head img,
.pe-public-intro img {
  width: 136px;
  max-height: 54px;
  object-fit: contain;
}

.pe-email-preview-head div,
.pe-public-intro div {
  display: grid;
  gap: 3px;
}

.pe-email-preview-head span,
.pe-public-intro span,
.pe-email-preview small {
  color: var(--muted);
}

.pe-email-campaign {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.pe-email-campaign div,
.pe-budget-summary {
  padding: 10px;
  border: 1px solid #cfe1f5;
  border-radius: 8px;
  background: #e5f5ee;
}

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

.pe-email-campaign dd {
  margin: 3px 0 0;
  color: #053b78;
  font-weight: 900;
}

.pe-lines-wrap {
  overflow-x: auto;
  border: 1px solid #cfe1f5;
  border-radius: 8px;
  background: #ffffff;
}

.pe-lines-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
}

.pe-lines-toolbar label {
  width: min(440px, 100%);
}

.pe-lines-toolbar span {
  color: #0b4a86;
  font-size: 12px;
  font-weight: 800;
}

.pe-lines-table {
  width: 100%;
  min-width: 1460px;
  border-collapse: collapse;
}

.pe-lines-table th,
.pe-lines-table td {
  padding: 8px;
  border-bottom: 1px solid #dcefeb;
  text-align: left;
  vertical-align: middle;
}

.pe-lines-table th {
  color: #0b4a86;
  background: #dcefeb;
  font-size: 11px;
}

.pe-lines-table th small {
  display: block;
  color: var(--muted);
  font-weight: 650;
}

.pe-lines-table input,
.pe-lines-table select {
  min-width: 118px;
}

.pe-lines-table input:disabled {
  border-color: #d5dedc;
  background: #edf1f0;
  color: #859390;
  cursor: not-allowed;
}

.pe-file-button {
  display: inline-flex;
  padding: 7px 9px;
  border-radius: 6px;
  color: #ffffff;
  background: #0b4a86;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}

.pe-file-button input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.pe-form-actions {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.pe-budget-summary {
  display: grid;
  min-width: 270px;
  gap: 3px;
}

.pe-budget-summary span,
.pe-budget-summary small {
  color: #42666a;
  font-size: 12px;
}

.pe-budget-summary strong {
  color: #053b78;
  font-size: 20px;
}

.pe-tracking-list {
  display: grid;
  gap: 7px;
}

.pe-tracking-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  padding: 9px;
  border: 1px solid #cfe1f5;
  border-radius: 7px;
  background: #f6fbfa;
}

.pe-tracking-row div {
  display: grid;
  gap: 2px;
}

.pe-tracking-row span {
  color: #42666a;
  font-size: 12px;
}

@media (max-width: 720px) {
  .pe-form-actions,
  .pe-email-campaign,
  .pe-lines-toolbar {
    grid-template-columns: 1fr;
    display: grid;
  }

  .pe-budget-summary {
    min-width: 0;
  }

  .pe-tracking-row {
    grid-template-columns: 1fr;
    gap: 5px;
  }
}

/* Menu texte compact : une ligne par module, sans pictogrammes. */
.nav-item {
  display: flex !important;
  grid-template-columns: none !important;
  align-items: center !important;
  gap: 0 !important;
  min-width: 0 !important;
  padding: 9px 11px 9px 16px !important;
}

.nav-item .nav-label,
.nav-group-toggle .nav-label {
  display: block !important;
  min-width: 0 !important;
  overflow: hidden !important;
  color: inherit !important;
  background: transparent !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.nav-group-toggle {
  grid-template-columns: minmax(0, 1fr) 18px !important;
  padding: 9px 11px 9px 16px !important;
  white-space: nowrap !important;
}

.nav-chevron {
  transform: rotate(-90deg) !important;
  transform-origin: center !important;
  color: #7fd3ff !important;
  font-size: 15px !important;
}

.nav-group.open .nav-chevron {
  transform: rotate(0deg) !important;
}

.nav-submenu {
  padding-left: 12px !important;
}

.nav-subitem {
  padding-left: 18px !important;
}

.dashboard-module-tabs .page-tab {
  min-width: fit-content;
}

.need-modal .modal-header {
  min-height: 44px;
  gap: 10px;
}

.need-modal .modal-header h2 {
  margin: 0;
  font-size: 22px;
}

.info-box {
  margin: 0;
  padding: 12px;
  border-radius: 8px;
  background: var(--soft-teal);
  color: var(--teal-dark);
  line-height: 1.45;
}

.modal label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px 14px;
  color: var(--ink);
  background: linear-gradient(180deg, #ffffff, #fbfdfc);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), 0 1px 2px rgba(24, 40, 34, 0.04);
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(11, 127, 122, 0.14);
}

input[type="file"] {
  padding: 8px;
  border-style: dashed;
  background: #ffffff;
}

input[type="file"]::file-selector-button {
  margin-right: 10px;
  border: 0;
  border-radius: 8px;
  padding: 9px 12px;
  background: var(--teal);
  color: #fff;
  font-weight: 850;
  cursor: pointer;
}

textarea {
  resize: vertical;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.compact-grid {
  grid-template-columns: minmax(120px, 0.45fr) minmax(0, 1fr);
}

.checkbox-row {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff, #f4faf7);
}

.checkbox-row label {
  grid-template-columns: auto 1fr;
  align-items: center;
  color: var(--ink);
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid #d8e5f2;
  border-radius: 8px;
  background: #ffffff;
}

.checkbox-row input {
  width: auto;
}

menu {
  justify-content: flex-end;
  padding: 0;
  margin: 4px 0 0;
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  max-width: 380px;
  padding: 14px 16px;
  border-radius: 8px;
  background: #08234a;
  color: #fff;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
  z-index: 20;
}

.toast.visible {
  opacity: 1;
  transform: translateY(0);
}

.is-hidden {
  display: none !important;
}

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

  .need-side-panel {
    position: static;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .need-side-panel-header,
  .need-files-field {
    grid-column: 1 / -1;
  }

  .login-screen,
  .signup-screen {
    grid-template-columns: minmax(0, 1fr) minmax(280px, 0.85fr);
  }

  .login-hero,
  .signup-hero {
    height: 100vh;
    min-height: 0;
  }

  .signup-brand {
    width: min(360px, 56vw);
  }

  .signup-card {
    margin: 0;
    border-radius: 0;
  }

  .login-side,
  .signup-side {
    height: 100vh;
    min-height: 0;
    padding: 12px;
  }

  .app-shell {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr);
    height: 100vh;
    overflow: hidden;
  }

  .main {
    height: auto;
    min-height: 0;
    overflow: hidden;
    padding: 12px;
  }

  .view.active {
    overflow-x: hidden;
    overflow-y: auto;
  }

  .sidebar {
    position: static;
    height: auto;
    padding: 10px;
    gap: 10px;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
    font-size: 18px;
  }

  .brand span {
    font-size: 12px;
  }

  .app-logo strong {
    font-size: 20px;
  }

  .app-logo small {
    display: none;
  }

  .app-logo-image {
    width: 70px;
    height: auto;
    }

  .nav-list {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
  }

  .nav-item {
    justify-content: center;
    min-height: 34px;
    padding: 7px 6px;
    font-size: 11px;
    gap: 5px;
  }

  .sidebar-card {
    display: none;
  }

  .hero-band,
  .content-grid,
  .supplier-layout,
  .messages-layout {
    grid-template-columns: 1fr;
  }

  .tenant-layout,
  .inventory-layout,
  .needs-layout,
  .contract-layout,
  .settings-layout {
    grid-template-columns: 1fr;
  }

  .account-summary-grid,
  .compact-account-grid,
  .account-access-grid,
  .profile-detail-grid,
  .contract-analysis-grid {
    grid-template-columns: 1fr;
  }

  .catalogue-category-grid {
    grid-template-columns: 1fr;
  }

  .admin-rights-grid {
    grid-template-columns: 1fr;
  }

  .pe-tracking-list article {
    grid-template-columns: 1fr;
  }

  .add-tenant-card {
    align-items: stretch;
    flex-direction: column;
  }

  .permissions-row {
    grid-template-columns: minmax(170px, 1.25fr) repeat(6, minmax(128px, 1fr));
  }

  .access-matrix-row {
    grid-template-columns: 1fr;
  }

  .access-matrix {
    grid-template-columns: 1fr;
  }

  .needs-toolbar {
    grid-template-columns: 1fr;
  }

  .need-detail {
    display: none;
  }

  .need-wizard {
    grid-template-columns: 1fr;
  }

  .need-type-picker {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .need-form-tabs {
    gap: 5px;
  }

  .need-form-tab {
    min-height: 30px;
    padding: 5px 3px;
    font-size: 11px;
  }

  .need-modal .modal-header .eyebrow,
  .selected-need-type small {
    display: none;
  }

  .selected-need-type {
    gap: 8px;
    padding: 6px 8px;
  }

  .selected-need-type > span {
    width: 30px;
    height: 30px;
    font-size: 18px;
  }

  .need-modal-footer {
    display: none;
  }

  .option-grid,
  .maintenance-scope {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

  #dash-indicators.active {
    display: block;
  }

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

  .charts-grid {
    grid-template-columns: 1fr;
  }

  .gantt-form {
    grid-template-columns: 1fr 1fr;
  }

  .plan-selector,
  .modal-plan-selector {
    grid-template-columns: 1fr;
  }

  .table-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .table-head {
    display: none;
  }
}

@media (max-width: 640px) {
  .login-screen,
  .signup-screen {
    grid-template-columns: 1fr;
    grid-template-rows: 86px minmax(0, 1fr);
  }

  .login-hero,
  .signup-hero {
    height: auto;
    min-height: 0;
    padding: 10px 14px;
    gap: 8px;
  }

  .signup-copy h1 {
    font-size: 18px;
    margin-bottom: 4px;
  }

  .signup-brand {
    width: min(260px, 62vw);
  }

  .signup-copy p {
    display: none;
  }

  .login-side,
  .signup-side {
    height: 100%;
    min-height: 0;
    padding: 10px 14px 14px;
    align-items: start;
  }

  .pricing-card {
    max-height: 100%;
    padding: 12px;
    gap: 8px;
  }

  .signup-card {
    max-height: 100%;
    padding: 12px;
    gap: 7px;
  }

  .signup-card h2 {
    display: none;
  }

  .selected-plan {
    padding: 6px 9px;
    font-size: 12px;
  }

  .signup-pane {
    gap: 8px;
  }

  .signup-card label {
    gap: 5px;
    font-size: 12px;
  }

  .signup-card input,
  .signup-card select {
    padding: 8px 9px;
  }

  .signup-steps {
    gap: 4px;
  }

  .signup-step {
    min-height: 30px;
    font-size: 11px;
  }

  .email-verify-row {
    gap: 6px;
  }

  #createAccountButton {
    min-height: 32px;
  }

  .pricing-card h2 {
    font-size: 18px;
    margin-bottom: 0;
  }

  .pricing-options,
  .plan-preview-metrics {
    grid-template-columns: 1fr;
  }

  .pricing-option {
    min-height: 42px;
    padding: 7px 9px;
  }

  .plan-preview {
    padding: 10px;
    gap: 8px;
  }

  .plan-preview-header {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .plan-preview p,
  .plan-preview ul {
    display: none;
  }

  .pricing-option span {
    font-size: 12px;
  }

  .email-verify-row {
    grid-template-columns: 1fr;
  }

  .main {
    padding: 10px;
  }

  .topbar,
  .section-header {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .hero-band {
    min-height: 112px;
    padding: 12px;
  }

  .hero-band h2 {
    font-size: 20px;
    margin-bottom: 6px;
  }

  .hero-band p,
  .hero-panel {
    display: none;
  }

  .topbar h1 {
    font-size: 20px;
  }

  .topbar-actions {
    gap: 6px;
  }

  .account-strip {
    display: none;
  }

  .page-tabs {
    margin: 8px 0;
    overflow-x: auto;
    overflow-y: hidden;
  }

  .page-tab {
    flex: 0 0 auto;
    min-height: 32px;
    padding: 0 6px;
    font-size: 12px;
  }

  .establishment-tabs .page-tab {
    min-width: 138px;
  }

  .metrics-grid,
  .cards-grid,
  .form-grid,
  .compact-grid {
    grid-template-columns: 1fr;
  }

  .account-strip,
  .tenant-card {
    align-items: flex-start;
    flex-direction: column;
  }

  .tenant-select {
    width: 100%;
  }

  .reply-box {
    grid-template-columns: 1fr;
  }

  .message-item {
    max-width: 100%;
  }

  .gantt-form {
    grid-template-columns: 1fr;
  }
}

/* Theme BioPartner : blanc, bleu profond et cyan. */
:root {
  --bg: #f4f8fc;
  --ink: #10233f;
  --muted: #63748a;
  --line: #d8e5f2;
  --panel: #ffffff;
  --teal: #0b6fd7;
  --teal-dark: #08234a;
  --green: #1266f1;
  --soft-teal: #edf6ff;
  --shadow: 0 18px 45px rgba(8, 35, 74, 0.10);
}

body {
  color: var(--ink);
  background: linear-gradient(180deg, #f8fbff 0%, #edf4fb 100%);
}

.sidebar {
  background: linear-gradient(180deg, #071c3d 0%, #08234a 54%, #0a3568 100%);
  color: #ffffff;
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.08);
}

.nav-item {
  color: #d8e7f8;
}

.nav-item span {
  color: #7fd3ff;
}

.nav-item:hover,
.nav-item.active {
  background: linear-gradient(135deg, rgba(18, 102, 241, 0.26), rgba(35, 168, 255, 0.18));
  color: #ffffff;
}

.sidebar-card {
  border-color: rgba(127, 211, 255, 0.22);
  background: rgba(255, 255, 255, 0.08);
}

.sidebar-card p,
.brand span {
  color: #c6d9ef;
}

.main {
  background:
    radial-gradient(circle at 100% 0%, rgba(35, 168, 255, 0.12), transparent 32%),
    linear-gradient(180deg, #f8fbff 0%, #eef5fb 100%);
}

.panel,
.metric-card,
.login-card,
.pricing-card,
.signup-card,
.organization-document-card,
.tenant-card,
.table-row,
.need-form-shell,
.modal-body,
dialog {
  background: #ffffff;
  border-color: var(--line);
  box-shadow: 0 14px 34px rgba(8, 35, 74, 0.08);
}

.page-tab,
.signup-step,
.filter-button,
.mini-button,
.ghost-button,
.outline-button {
  border-color: #bfd5ec;
  background: #ffffff;
  color: #0b3f78;
}

.page-tab.active,
.signup-step.active,
.signup-step.completed,
.filter-button.active {
  background: linear-gradient(135deg, #1266f1, #23a8ff);
  border-color: #1266f1;
  color: #ffffff;
  box-shadow: 0 10px 22px rgba(18, 102, 241, 0.22);
}

.primary-button,
.need-cta-button,
.plan-submit-button,
.status-action.accept,
.status-action.close {
  background: linear-gradient(135deg, #0b4fb8, #1266f1 55%, #23a8ff);
  border-color: #1266f1;
  color: #ffffff;
  box-shadow: 0 12px 26px rgba(18, 102, 241, 0.24);
}

.primary-button:hover,
.need-cta-button:hover,
.plan-submit-button:hover {
  background: linear-gradient(135deg, #082f7a, #0b5ce7 55%, #188fe2);
}

input,
select,
textarea {
  background: #f7fbff;
  border-color: #bfd5ec;
  color: #10233f;
}

input:focus,
select:focus,
textarea:focus {
  border-color: #1266f1;
  box-shadow: 0 0 0 3px rgba(18, 102, 241, 0.14);
  background: #ffffff;
}

.eyebrow,
.panel-header h3,
.section-header h2,
.metric-card strong,
.table-row strong {
  color: #08234a;
}

.status.active,
.status.neutral,
.selected-pill,
.file-hint,
.empty-state {
  border-color: #cfe1f5;
  background: #edf6ff;
  color: #0b4a86;
}

.status.success,
.status.done,
.status-action.done {
  background: #e9f3ff;
  color: #0b4fb8;
  border-color: #9fc5f2;
}

.status.warning,
.status-action.start {
  background: #fff4df;
  color: #805516;
  border-color: #f2cf8b;
}

.status.danger,
.filter-vigilance {
  background: #c9503f;
  color: #ffffff;
}

.filter-all,
.filter-maintenance,
.filter-contrat,
.filter-audit,
.filter-autres {
  background: #0b4fb8;
  color: #ffffff;
}

.filter-achat {
  background: #1d8bd8;
  color: #ffffff;
}

.gantt-bar.done,
.revision-status.done,
.collaborator-rights-cell select,
.rights-matrix select {
  border-color: #9fc5f2;
  background: #edf6ff;
  color: #0b4a86;
}

.terms-acceptance {
  border-color: rgba(18, 102, 241, .22);
  background: rgba(237, 246, 255, .86);
}

.need-type-card,
.need-pane,
.need-side-panel,
.need-surface,
.scope-option,
.attachment-zone,
.import-panel,
.revision-plan-card,
.contract-analysis-card,
.materiovigilance-card,
.pe-invite-card,
.catalogue-card,
.account-summary-grid article,
.add-tenant-card,
.pending-requests article {
  border-color: #d8e5f2;
  background: linear-gradient(180deg, #ffffff, #f7fbff);
}

.need-type-card:hover,
.need-type-card.active,
.scope-option:has(input:checked) {
  border-color: #1266f1;
  background: #edf6ff;
  box-shadow: 0 12px 26px rgba(18, 102, 241, 0.14);
}

.filter-maintenance { background: #1266f1; }
.filter-audit { background: #0b4fb8; }
.filter-autres { background: #315f91; }

.gantt-row,
.inventory-preview,
.equipment-picker-table,
.rights-table,
.organization-document-list a {
  border-color: #d8e5f2;
  background: #ffffff;
}

.gantt-bar.planned,
.gantt-bar.done,
.gantt-bar.progress {
  background: linear-gradient(135deg, #1266f1, #23a8ff);
  color: #ffffff;
}

.already-client-button,
.pricing-option.recommended,
.pricing-option.selected,
.plan-preview,
.plan-preview[data-plan="BioGrade"],
.plan-preview[data-plan="BioExpert"] {
  background:
    linear-gradient(110deg, rgba(255, 255, 255, 0.28), transparent 30%, rgba(255, 255, 255, 0.18)),
    linear-gradient(135deg, #08234a, #1266f1 62%, #23a8ff);
  border-color: rgba(18, 102, 241, 0.42);
  color: #ffffff;
}

.plan-preview small,
.plan-preview li,
.plan-preview p {
  color: #dcecff;
}

.plan-preview-badge,
.pricing-option small,
.plan-preview-header span {
  background: #23a8ff;
  color: #08234a;
}

.mini-dashboard-chart,
.chart-placeholder,
.donut-chart,
.risk-chart {
  background:
    radial-gradient(circle at 72% 18%, rgba(35, 168, 255, 0.18), transparent 32%),
    linear-gradient(180deg, #ffffff, #edf6ff);
  border-color: #d8e5f2;
}

.chart-bar,
.bar-fill,
.progress-fill,
.timeline-dot {
  background: linear-gradient(180deg, #1266f1, #23a8ff);
}

.gantt-bar.done,
.status-action.done {
  background: linear-gradient(135deg, #0b4fb8, #188fe2);
}

.brand {
  justify-content: center;
  text-align: center;
}

.sidebar-brand-word {
  display: block;
  width: 100%;
  padding: 12px 8px 10px;
  color: #ffffff;
  font-size: 25px;
  font-weight: 950;
  line-height: 1;
  letter-spacing: 0;
  text-align: center;
  background: linear-gradient(135deg, #ffffff 0%, #9bdcff 45%, #23a8ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.app-logo-image {
  display: none;
}

.main {
  padding: 14px 18px;
}

.topbar {
  min-height: 54px;
  margin-bottom: 8px;
}

.topbar h1 {
  font-size: clamp(21px, 2vw, 27px);
}

.view.active {
  gap: 8px;
  padding: 2px 6px 12px 0;
  scroll-padding-top: 76px;
}

.section-header {
  position: sticky;
  top: 0;
  z-index: 12;
  min-height: 54px;
  margin: 0 0 8px;
  padding: 8px 10px;
  border: 1px solid #d8e5f2;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 10px 24px rgba(8, 35, 74, 0.08);
  backdrop-filter: blur(10px);
}

.section-header h2 {
  font-size: clamp(21px, 2.2vw, 28px);
  line-height: 1.12;
}

.section-header .eyebrow {
  font-size: 11px;
}

.page-tabs {
  margin: 0 0 8px;
  padding: 4px;
  border: 1px solid #d8e5f2;
  border-radius: 8px;
  background: #ffffff;
}

.page-tab {
  min-height: 32px;
  padding: 0 10px;
}

.metrics-grid,
.cards-grid {
  gap: 10px;
}

.metric-card,
.panel {
  padding: 14px;
}

.view.active::-webkit-scrollbar-track {
  background: #edf6ff;
}

.view.active::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #1266f1, #23a8ff);
  border-color: #edf6ff;
}

.account-strip,
.need-row.selected,
.maintenance-scope label:has(input:checked),
.maintenance-scope-panel,
.need-type-card.maintenance,
.need-summary-panel,
.need-form-sidebar,
.need-form-aside,
.scope-option,
.scope-option:has(input:checked),
.organization-document-list a,
.rights-table,
.collaborator-rights-grid,
.admin-access-card,
.revision-detail-card,
.import-preview-card,
.message-item,
.inbox-item,
.table-panel {
  border-color: #d8e5f2;
  background: linear-gradient(180deg, #ffffff, #f7fbff);
  color: #10233f;
  box-shadow: none;
}

.need-row.selected,
.maintenance-scope label:has(input:checked),
.scope-option:has(input:checked) {
  border-color: #1266f1;
  background: #edf6ff;
  box-shadow: inset 4px 0 0 #1266f1;
}

.need-type-card.maintenance,
.need-type-card.audit,
.need-type-card.other,
.need-type-card.contract,
.need-type-card.purchase,
.need-type-card.vigilance {
  background: linear-gradient(135deg, #edf6ff, #dceeff);
}

.need-type-card.maintenance .need-type-icon,
.need-type-card.audit .need-type-icon,
.need-type-card.other .need-type-icon,
.need-type-card.contract .need-type-icon,
.need-type-card.purchase .need-type-icon,
.need-type-card.vigilance .need-type-icon {
  color: #08234a;
}

.filter-maintenance,
.filter-audit,
.filter-autres,
.filter-all,
.filter-contrat {
  background: #0b4fb8;
}

.status-action.done,
.revision-status.done,
.status.success,
.status.done,
.gantt-bar.done,
.gantt-bar.planned {
  background: linear-gradient(135deg, #1266f1, #23a8ff);
  color: #ffffff;
  border-color: #1266f1;
}

.chart-done,
.chart-success,
.contract-kpi-accent,
.dashboard-accent,
.gantt-dot.done {
  background: #1266f1;
  color: #ffffff;
}

#dashboard .hero-band {
  display: none;
}

.need-modal,
.need-modal form,
.need-category-step,
.need-wizard,
.need-form-area,
.need-form-main {
  background: #ffffff;
  color: #10233f;
}

.need-modal .modal-header,
.need-category-header,
.selected-need-type,
.need-side-panel,
.need-form-section,
.need-pane,
.maintenance-fields,
.typed-need-fields,
.maintenance-scope-panel,
.selected-equipment-box,
.need-files-field {
  border-color: #d8e5f2;
  background: linear-gradient(180deg, #ffffff, #f7fbff);
  color: #10233f;
  box-shadow: none;
}

.need-modal .modal-header h2,
.need-category-header h3,
.need-category-header p,
.need-side-panel strong,
.field-group-title,
.section-mini-title strong {
  color: #08234a;
}

.need-category-header {
  background:
    radial-gradient(circle at 94% 0%, rgba(35, 168, 255, 0.14), transparent 28%),
    linear-gradient(135deg, #ffffff, #edf6ff);
}

.need-form-tab.active,
.selected-need-type,
.maintenance-scope label:has(input:checked),
.maintenance-scope-panel,
.need-form-section {
  border-color: #cfe1f5;
  background: #f7fbff;
  box-shadow: inset 4px 0 0 #1266f1;
}

.need-form-tab.completed,
.need-form-tab.completed::after {
  border-color: #1266f1;
  background: #1266f1;
  color: #ffffff;
}

.need-type-card.maintenance,
.need-type-card.audit,
.need-type-card.purchase,
.need-type-card.contract,
.need-type-card.vigilance,
.need-type-card.other {
  background: linear-gradient(135deg, #ffffff, #edf6ff);
  border-color: #d8e5f2;
  color: #10233f;
}

.need-type-card.active,
.need-type-card:hover {
  border-color: #1266f1;
  background: linear-gradient(135deg, #edf6ff, #dceeff);
  box-shadow: 0 14px 28px rgba(18, 102, 241, 0.16);
}

.sidebar {
  overflow-y: auto;
  scrollbar-gutter: stable;
  gap: 16px;
}

.sidebar::-webkit-scrollbar {
  width: 8px;
}

.sidebar::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.08);
}

.sidebar::-webkit-scrollbar-thumb {
  background: rgba(127, 211, 255, 0.58);
  border-radius: 999px;
}

.brand {
  justify-content: center;
}

.sidebar-logo-full {
  display: block;
  width: min(180px, 100%);
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 10px 20px rgba(0, 0, 0, .20));
}

.sidebar-card {
  margin-top: 6px;
}

.nav-list {
  gap: 6px;
}

.nav-item {
  min-height: 38px;
  padding: 9px 11px;
}

.sidebar-brand-word {
  display: none;
}

.chip.filter-all { background: linear-gradient(135deg, #08234a, #0b4fb8); color: #fff; }
.chip.filter-maintenance { background: linear-gradient(135deg, #1266f1, #23a8ff); color: #fff; }
.chip.filter-achat { background: linear-gradient(135deg, #c5892d, #f0b44d); color: #111827; }
.chip.filter-contrat { background: linear-gradient(135deg, #4267b2, #7fa4f8); color: #fff; }
.chip.filter-vigilance { background: linear-gradient(135deg, #c9503f, #f39a88); color: #fff; }
.chip.filter-audit { background: linear-gradient(135deg, #0b4fb8, #6d8fe8); color: #fff; }
.chip.filter-autres { background: linear-gradient(135deg, #6d5a96, #b7a4df); color: #fff; }

.chip.active {
  color: #111827;
  box-shadow: 0 0 0 3px rgba(18, 102, 241, .22), 0 10px 22px rgba(8, 35, 74, .14);
}

.need-type-card.maintenance { background: linear-gradient(135deg, #dcecff, #9ccfff); }
.need-type-card.purchase { background: linear-gradient(135deg, #fff0d0, #ffc86f); }
.need-type-card.vigilance { background: linear-gradient(135deg, #ffe2dd, #f2a096); }
.need-type-card.contract { background: linear-gradient(135deg, #e5eaff, #aebffd); }
.need-type-card.audit { background: linear-gradient(135deg, #e6f0ff, #9fbaf2); }
.need-type-card.other { background: linear-gradient(135deg, #f1ecff, #c8b7ed); }

.need-type-card strong,
.need-type-card small,
.need-type-card span {
  color: #10233f;
}

.need-side-panel label,
.need-form-section label,
.need-modal input,
.need-modal select,
.need-modal textarea {
  background: #ffffff;
  border-color: #b9d2ec;
  color: #10233f;
}

.field-group-title,
.section-mini-title {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 5px 10px;
  border-radius: 999px;
  background: #dcecff;
  color: #08234a;
  border: 1px solid #b9d2ec;
}

.need-files-field strong,
.need-files-field:hover strong {
  color: #ffffff;
  background: linear-gradient(135deg, #08234a, #1266f1);
  border-color: #1266f1;
}

.pe-arbitrage-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.pe-arbitrage-summary article {
  padding: 12px;
  border: 1px solid #d8e5f2;
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff, #f7fbff);
}

.pe-arbitrage-summary span,
.pe-arbitrage-summary small {
  display: block;
  color: #63748a;
}

.pe-arbitrage-summary strong {
  display: block;
  margin: 3px 0;
  color: #08234a;
  font-size: 22px;
}

.pe-table-tools {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}

.pe-arbitrage-table-wrap {
  overflow: auto;
  border: 1px solid #d8e5f2;
  border-radius: 8px;
  background: #ffffff;
}

.pe-arbitrage-table {
  width: 100%;
  min-width: 1180px;
  border-collapse: collapse;
}

.pe-arbitrage-table th,
.pe-arbitrage-table td {
  padding: 10px;
  border-bottom: 1px solid #d8e5f2;
  text-align: left;
  vertical-align: middle;
}

.pe-arbitrage-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #08234a;
  color: #ffffff;
}

.pe-arbitrage-table td strong,
.pe-arbitrage-table td small {
  display: block;
}

.pe-arbitrage-table td small {
  color: #63748a;
  margin-top: 3px;
}

.pe-arbitrage-table input,
.pe-arbitrage-table select {
  min-width: 130px;
}

.pe-empty-row td {
  text-align: center;
  color: #63748a;
}

.pe-analysis-bars {
  display: grid;
  gap: 12px;
}

.pe-analysis-bars article {
  display: grid;
  gap: 6px;
}

.pe-analysis-bars strong {
  display: block;
  width: 100%;
  height: 16px;
  border-radius: 999px;
  background: linear-gradient(90deg, #1266f1 var(--value), #edf6ff var(--value));
  border: 1px solid #cfe1f5;
}

.pe-analysis-donut {
  width: 180px;
  aspect-ratio: 1;
  margin: 10px auto;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: conic-gradient(#1266f1 0 48%, #23a8ff 48% 78%, #c7ddf6 78% 100%);
  color: #ffffff;
  box-shadow: inset 0 0 0 34px #ffffff, 0 14px 28px rgba(8, 35, 74, .12);
}

.pe-analysis-donut span,
.pe-analysis-donut small {
  grid-area: 1 / 1;
  color: #08234a;
}

.pe-analysis-donut small {
  margin-top: 46px;
}

.pe-analysis-legend {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  color: #63748a;
}

.pe-analysis-legend i {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 5px;
  background: #1266f1;
}

@media (max-height: 820px) {
  .sidebar {
    gap: 10px;
    padding: 14px;
  }

  .sidebar-logo-full {
    width: 150px;
  }

  .sidebar-card {
    padding: 12px;
  }
}

/* Correctifs finaux BioPartner : logo, lisibilite, besoins et PE. */
.sidebar {
  overflow-y: auto !important;
  overflow-x: hidden !important;
  padding: 14px 14px 12px !important;
  gap: 10px !important;
}

.sidebar .brand {
  justify-content: center !important;
  padding: 2px 0 8px !important;
  min-height: auto !important;
}

.sidebar-logo-full {
  display: block !important;
  width: min(176px, 92%) !important;
  max-height: 78px !important;
  object-fit: contain !important;
  background: transparent !important;
}

.sidebar-card {
  flex: 0 0 auto !important;
  margin-top: 4px !important;
  padding: 10px !important;
}

.sidebar-card p {
  font-size: 11.5px !important;
  line-height: 1.35 !important;
}

.nav-list {
  gap: 5px !important;
}

.nav-item {
  min-height: 34px !important;
  padding: 8px 10px !important;
}

.chip.filter-all,
.chip.filter-maintenance,
.chip.filter-achat,
.chip.filter-contrat,
.chip.filter-vigilance,
.chip.filter-audit,
.chip.filter-autres {
  border: 0 !important;
  min-height: 32px !important;
  font-weight: 800 !important;
}

.chip.filter-all { background: linear-gradient(135deg, #061a38, #0b4fb8) !important; color: #fff !important; }
.chip.filter-maintenance { background: linear-gradient(135deg, #1266f1, #25a7ff) !important; color: #fff !important; }
.chip.filter-achat { background: linear-gradient(135deg, #f2a51a, #ffd36a) !important; color: #10233f !important; }
.chip.filter-contrat { background: linear-gradient(135deg, #4254c7, #8aa0ff) !important; color: #fff !important; }
.chip.filter-vigilance { background: linear-gradient(135deg, #c9503f, #ff9d8b) !important; color: #fff !important; }
.chip.filter-audit { background: linear-gradient(135deg, #7c3aed, #b69cff) !important; color: #fff !important; }
.chip.filter-autres { background: linear-gradient(135deg, #475569, #9aa6b8) !important; color: #fff !important; }

.chip.active {
  color: #111827 !important;
  box-shadow: 0 0 0 3px rgba(18, 102, 241, .24), 0 12px 24px rgba(8, 35, 74, .16) !important;
}

.need-modal,
.need-modal form,
.need-category-header,
.selected-need-type,
.need-form-section,
.maintenance-scope-panel {
  background: #f4f8fd !important;
  border-color: #d5e4f3 !important;
}

.need-category-header,
.selected-need-type,
.need-form-section {
  box-shadow: none !important;
}

.need-category-header h3,
.need-category-header p,
.selected-need-type strong,
.selected-need-type small {
  color: #08234a !important;
}

.need-type-card.maintenance { background: linear-gradient(135deg, #e5f1ff, #a9d4ff) !important; border-color: #8fc5ff !important; }
.need-type-card.purchase { background: linear-gradient(135deg, #fff4dc, #ffc95f) !important; border-color: #f2a51a !important; }
.need-type-card.vigilance { background: linear-gradient(135deg, #ffe6e1, #ff9d8b) !important; border-color: #e87968 !important; }
.need-type-card.contract { background: linear-gradient(135deg, #e8ecff, #9eafff) !important; border-color: #7488ea !important; }
.need-type-card.audit { background: linear-gradient(135deg, #f0e9ff, #bfa7ff) !important; border-color: #9d7cf5 !important; }
.need-type-card.other { background: linear-gradient(135deg, #eef2f7, #b7c3d0) !important; border-color: #94a3b8 !important; }

.need-type-card.active,
.need-type-card:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 0 0 3px rgba(18, 102, 241, .22), 0 14px 28px rgba(8, 35, 74, .16) !important;
}

.need-type-card strong,
.need-type-card small,
.need-type-card span {
  color: #0f2441 !important;
}

.need-side-panel label,
.need-form-section label,
.need-modal input,
.need-modal select,
.need-modal textarea,
.maintenance-scope label,
.typed-need-fields label {
  background: #ffffff !important;
  border-color: #b9d2ec !important;
  color: #10233f !important;
}

.need-modal input:focus,
.need-modal select:focus,
.need-modal textarea:focus {
  border-color: #1266f1 !important;
  box-shadow: 0 0 0 3px rgba(18, 102, 241, .16) !important;
}

.field-group-title,
.section-mini-title,
.need-modal .section-mini-title {
  background: #e5f1ff !important;
  border: 1px solid #b9d2ec !important;
  color: #08234a !important;
}

.section-mini-title span,
.field-group-title span {
  background: #1266f1 !important;
  color: #ffffff !important;
}

/* Priorite finale : navigation et actions laterales. */
.nav-item .nav-label,
.nav-group-toggle .nav-label {
  text-transform: uppercase !important;
  letter-spacing: .03em !important;
  color: inherit !important;
  background: transparent !important;
}

.sidebar-actions {
  position: sticky !important;
  bottom: -1px !important;
  z-index: 30 !important;
  margin-top: auto !important;
  display: grid !important;
  grid-template-columns: 48px minmax(0, 1fr) !important;
  gap: 8px !important;
  padding: 12px 0 2px !important;
  background: linear-gradient(180deg, rgba(6, 26, 56, 0), #061a38 20%) !important;
}

.sidebar-inbox-button {
  width: 44px !important;
  min-width: 44px !important;
  height: 42px !important;
  justify-content: center !important;
  padding: 0 !important;
}

.sidebar-inbox-button .inbox-icon {
  color: #ffffff !important;
  background: transparent !important;
  font-size: 21px !important;
}

.sidebar-inbox-button.has-unread-alert {
  border-color: #ff6b76 !important;
  box-shadow: 0 0 0 3px rgba(255, 72, 88, .18), 0 8px 22px rgba(255, 72, 88, .24) !important;
  animation: inboxVibration 4.2s ease-in-out infinite;
  transform-origin: 50% 85%;
}

.sidebar-inbox-button.has-unread-alert .inbox-icon {
  color: #ffffff !important;
}

.sidebar-inbox-button.has-unread-alert #inboxUnreadCount {
  background: #ef3340 !important;
  color: #ffffff !important;
  box-shadow: 0 0 0 3px rgba(239, 51, 64, .2);
}

@keyframes inboxVibration {
  0%, 14%, 100% { transform: rotate(0deg) scale(1); }
  2% { transform: rotate(-8deg) scale(1.04); }
  4% { transform: rotate(8deg) scale(1.04); }
  6% { transform: rotate(-7deg) scale(1.04); }
  8% { transform: rotate(7deg) scale(1.04); }
  10% { transform: rotate(-4deg) scale(1.02); }
  12% { transform: rotate(4deg) scale(1.02); }
}

@media (prefers-reduced-motion: reduce) {
  .sidebar-inbox-button.has-unread-alert {
    animation: none;
  }
}

.sidebar-actions .inbox-panel {
  top: auto !important;
  right: auto !important;
  bottom: calc(100% + 10px) !important;
  left: 0 !important;
}

.sidebar-need-button,
.sidebar-logout-button {
  width: 100% !important;
}

.sidebar-need-button {
  justify-content: center !important;
  animation: none !important;
}

.sidebar-logout-button {
  grid-column: 1 / -1 !important;
  min-height: 36px !important;
  color: #d8f0ff !important;
  border-color: rgba(255, 255, 255, .18) !important;
  background: rgba(255, 255, 255, .07) !important;
}

.topbar {
  min-height: 0 !important;
  padding-block: 8px !important;
  justify-content: flex-end !important;
}

.topbar:has(.topbar-actions:empty) {
  display: none !important;
}

.filters .chip.filter-all.active {
  color: #ffffff !important;
  background: linear-gradient(135deg, #061a38, #0b4fb8) !important;
  box-shadow: 0 0 0 3px rgba(18, 102, 241, .28), 0 10px 22px rgba(7, 59, 120, .22) !important;
}

/* Boite messages : affichage modal toujours visible. */
body.inbox-open::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9000;
  pointer-events: none;
  background: rgba(6, 26, 56, .18);
  backdrop-filter: none;
}

body.inbox-open .sidebar {
  z-index: 10000 !important;
}

.sidebar-actions .inbox-panel:not(.is-hidden) {
  position: fixed !important;
  z-index: 10001 !important;
  display: grid !important;
  top: 50% !important;
  left: 50% !important;
  right: auto !important;
  bottom: auto !important;
  width: min(560px, calc(100vw - 32px)) !important;
  max-height: min(82vh, 720px) !important;
  padding: 16px !important;
  overflow: hidden !important;
  transform: translate(-50%, -50%) !important;
  border: 1px solid #b9d2ec !important;
  border-radius: 12px !important;
  background: #f7fbff !important;
  box-shadow: 0 32px 90px rgba(6, 26, 56, .42) !important;
}

.sidebar-actions .inbox-panel:not(.is-hidden) .inbox-list {
  max-height: calc(min(82vh, 720px) - 92px) !important;
  overflow-y: auto !important;
}

/* Sous-menu Maintenance clairement distingue. */
.nav-group.open {
  margin-block: 3px !important;
  padding: 5px !important;
  border: 1px solid rgba(127, 211, 255, .22) !important;
  border-radius: 8px !important;
  background: rgba(255, 255, 255, .055) !important;
}

.nav-group.open .nav-group-toggle {
  color: #ffffff !important;
  background: rgba(35, 168, 255, .14) !important;
}

.nav-group.open .nav-submenu {
  gap: 4px !important;
  margin-top: 4px !important;
  padding: 4px 0 2px 9px !important;
  border-left: 2px solid #23a8ff !important;
}

.nav-group.open .nav-subitem {
  min-height: 36px !important;
  padding: 7px 9px 7px 13px !important;
  color: #d8f0ff !important;
  background: rgba(255, 255, 255, .045) !important;
}

.nav-group.open .nav-subitem:hover,
.nav-group.open .nav-subitem.active {
  color: #ffffff !important;
  background: rgba(35, 168, 255, .20) !important;
  box-shadow: inset 3px 0 0 #7fd3ff !important;
}

/* Import inventaire : aucun contenu fictif avant selection. */
#inventoryModal {
  width: min(1060px, calc(100vw - 28px)) !important;
}

#inventoryModal form {
  max-height: min(88vh, 820px) !important;
  overflow: auto !important;
}

#inventoryMappingPanel.is-hidden,
#inventoryPreview.is-hidden {
  display: none !important;
}

#inventoryMappingPanel {
  padding: 12px !important;
  border: 1px solid #b9d2ec !important;
  border-radius: 8px !important;
  background: #f4f8fd !important;
}

#inventoryMappingGrid {
  display: grid !important;
  grid-template-columns: minmax(180px, .7fr) minmax(220px, 1fr) !important;
  gap: 7px 10px !important;
  align-items: center !important;
}

#inventoryMappingGrid > span {
  color: #08234a !important;
  font-weight: 800 !important;
}

#inventoryMappingGrid select {
  width: 100% !important;
  background: #ffffff !important;
  border-color: #b9d2ec !important;
}

#inventoryPreviewRows {
  display: grid !important;
  gap: 5px !important;
  margin-top: 8px !important;
}

#inventoryPreviewRows .inventory-picker-row {
  grid-template-columns: repeat(5, minmax(100px, 1fr)) !important;
}

/* Boite de reception flottante au-dessus de toute la page. */
.sidebar {
  z-index: 50 !important;
}

.sidebar-actions .inbox-panel {
  position: fixed !important;
  z-index: 10000 !important;
  top: auto !important;
  right: auto !important;
  bottom: 14px !important;
  left: 326px !important;
  width: min(460px, calc(100vw - 350px)) !important;
  max-height: min(76vh, 680px) !important;
  overflow: hidden !important;
  border: 1px solid #b9d2ec !important;
  background: #f7fbff !important;
  box-shadow: 0 28px 80px rgba(6, 26, 56, .38) !important;
}

.sidebar-actions .inbox-list {
  max-height: calc(min(76vh, 680px) - 82px) !important;
  overflow-y: auto !important;
  overscroll-behavior: contain;
}

.sidebar-actions .inbox-panel-header {
  position: sticky;
  top: 0;
  z-index: 2;
  padding-bottom: 10px;
  background: #f7fbff;
}

@media (max-width: 1050px) {
  .sidebar-actions .inbox-panel {
    left: 296px !important;
    width: min(440px, calc(100vw - 316px)) !important;
  }
}

@media (max-width: 760px) {
  .sidebar-actions .inbox-panel {
    inset: auto 10px 10px 10px !important;
    width: auto !important;
    max-height: 78vh !important;
  }
}

/* Lisibilite complete du menu lateral. */
.app-shell {
  grid-template-columns: 310px minmax(0, 1fr) !important;
}

.sidebar {
  padding-inline: 16px !important;
}

.nav-item,
.nav-group-toggle {
  width: 100% !important;
  min-width: 0 !important;
}

.nav-item .nav-label,
.nav-group-toggle .nav-label,
.nav-item:hover .nav-label,
.nav-item.active .nav-label {
  width: auto !important;
  min-width: max-content !important;
  overflow: visible !important;
  color: inherit !important;
  background: transparent !important;
  text-overflow: clip !important;
  white-space: nowrap !important;
}

.nav-submenu {
  padding-left: 8px !important;
}

.nav-subitem {
  padding-left: 20px !important;
}

@media (max-width: 1050px) {
  .app-shell {
    grid-template-columns: 280px minmax(0, 1fr) !important;
  }

  .nav-item,
  .nav-group-toggle {
    font-size: 12px !important;
  }
}

/* Menu principal plus lisible. */
.nav-list {
  gap: 7px !important;
}

.nav-item,
.nav-group-toggle {
  min-height: 42px !important;
  font-size: 15px !important;
  line-height: 1.2 !important;
  font-weight: 750 !important;
}

.nav-subitem {
  min-height: 38px !important;
  font-size: 13.5px !important;
}

.nav-chevron {
  font-size: 18px !important;
}

@media (max-height: 780px) {
  .nav-list {
    gap: 4px !important;
  }

  .nav-item,
  .nav-group-toggle {
    min-height: 37px !important;
    font-size: 14px !important;
  }
}

/* Actions en pied de menu et navigation en majuscules. */
.nav-item .nav-label,
.nav-group-toggle .nav-label {
  text-transform: uppercase !important;
  letter-spacing: .03em !important;
}

.sidebar-actions {
  position: sticky;
  bottom: -1px;
  z-index: 20;
  margin-top: auto;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 8px;
  padding: 12px 0 2px;
  background: linear-gradient(180deg, rgba(6, 26, 56, 0), #061a38 20%);
}

.sidebar-actions .inbox-wrapper {
  grid-row: 1;
  grid-column: 1;
}

.sidebar-inbox-button {
  width: 44px;
  min-width: 44px;
  height: 42px;
  justify-content: center;
  padding: 0 !important;
}

.sidebar-inbox-button .inbox-icon {
  color: #ffffff !important;
  background: transparent !important;
  font-size: 21px;
}

.sidebar-actions .inbox-panel {
  top: auto;
  right: auto;
  bottom: calc(100% + 10px);
  left: 0;
}

.sidebar-need-button {
  grid-row: 1;
  grid-column: 2;
  width: 100%;
  justify-content: center;
  animation: none;
}

.sidebar-logout-button {
  grid-column: 1 / -1;
  width: 100%;
  min-height: 36px;
  color: #d8f0ff !important;
  border-color: rgba(255, 255, 255, .18) !important;
  background: rgba(255, 255, 255, .07) !important;
}

.topbar {
  min-height: 0 !important;
  padding-block: 8px !important;
  justify-content: flex-end !important;
}

.topbar:has(.topbar-actions:empty) {
  display: none !important;
}

.filters .chip.filter-all.active {
  color: #ffffff !important;
  background: linear-gradient(135deg, #061a38, #0b4fb8) !important;
  box-shadow: 0 0 0 3px rgba(18, 102, 241, .28), 0 10px 22px rgba(7, 59, 120, .22) !important;
}

/* Navigation principale sans initiales. */
.nav-item {
  position: relative !important;
  justify-content: flex-start !important;
  width: 100% !important;
  padding: 10px 12px 10px 16px !important;
  border: 0 !important;
  border-radius: 6px !important;
  color: #cfe8ff !important;
  background: transparent !important;
  box-shadow: none !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  text-align: left !important;
}

.nav-item::before {
  content: "";
  position: absolute;
  inset: 7px auto 7px 0;
  width: 3px;
  border-radius: 999px;
  background: transparent;
}

.nav-item:hover {
  color: #ffffff !important;
  background: rgba(255, 255, 255, .08) !important;
  box-shadow: none !important;
}

.nav-item.active {
  color: #ffffff !important;
  background: linear-gradient(135deg, rgba(18, 102, 241, .95), rgba(35, 168, 255, .82)) !important;
  box-shadow: 0 10px 22px rgba(18, 102, 241, .24) !important;
}

.nav-item.active::before {
  background: #ffffff;
}

.module-search {
  width: min(340px, 100%);
  min-height: 38px;
  padding: 8px 11px;
  border: 1px solid #b9d2ec;
  border-radius: 7px;
  background: #ffffff;
  color: #10233f;
}

.vigilance-modal {
  width: min(1120px, calc(100vw - 28px));
}

.vigilance-modal form {
  max-height: min(88vh, 820px);
  overflow: auto;
}

.vigilance-form-layout {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 14px;
  padding: 14px;
  background: #f4f8fd;
}

.vigilance-form-aside,
.vigilance-form-main {
  display: grid;
  align-content: start;
  gap: 11px;
  padding: 14px;
  border: 1px solid #d5e4f3;
  border-radius: 8px;
  background: #ffffff;
}

.vigilance-form-aside label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px;
  border: 1px solid #d5e4f3;
  border-radius: 7px;
  background: #edf6ff;
}

.vigilance-equipment-list {
  display: grid;
  max-height: 230px;
  overflow: auto;
  border: 1px solid #b9d2ec;
  border-radius: 8px;
  background: #ffffff;
}

.vigilance-equipment-list label {
  display: grid;
  grid-template-columns: 22px minmax(160px, 1fr) minmax(180px, 1fr);
  align-items: center;
  gap: 8px;
  padding: 9px 11px;
  border-bottom: 1px solid #e2edf7;
}

.vigilance-equipment-list label:has(input:checked) {
  background: #dcecff;
  box-shadow: inset 3px 0 0 #1266f1;
}

.compact-upload-button {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 38px;
  padding: 8px 12px;
  border-radius: 7px;
  background: linear-gradient(135deg, #08234a, #1266f1) !important;
  color: #ffffff !important;
  cursor: pointer;
}

.compact-upload-button input {
  display: none;
}

.compact-upload-button strong {
  color: #ffffff !important;
}

.catalogue-category-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.catalogue-category {
  min-height: 74px;
}

.catalogue-category.active {
  border-color: #1266f1;
  background: #dcecff;
  box-shadow: inset 0 -3px 0 #1266f1;
}

.message-module-filters {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.message-module-filters .chip {
  color: #08234a;
  background: #e5f1ff;
  border-color: #b9d2ec;
}

.message-module-filters .chip.active {
  color: #ffffff !important;
  background: #1266f1;
}

.messages-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, .7fr);
  gap: 14px;
}

.message-context {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: #63748a;
  font-size: 11px;
}

.message-context strong {
  color: #1266f1;
}

.message-compose-panel {
  display: grid;
  align-content: start;
  gap: 10px;
}

.message-compose-panel label {
  display: grid;
  gap: 5px;
  color: #0b3f78;
  font-weight: 700;
}

.message-compose-panel input,
.message-compose-panel select,
.message-compose-panel textarea {
  width: 100%;
  border: 1px solid #b9d2ec;
  border-radius: 7px;
  background: #ffffff;
}

.table-row.is-hidden,
[data-catalogue-row].is-hidden,
[data-message-row].is-hidden,
.vigilance-equipment-list label.is-hidden {
  display: none !important;
}

@media (max-width: 980px) {
  .vigilance-form-layout,
  .messages-workspace {
    grid-template-columns: 1fr;
  }

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

/* Navigation groupee et dashboards par module. */
.nav-item {
  display: grid !important;
  grid-template-columns: 28px minmax(0, 1fr) !important;
  align-items: center !important;
  gap: 8px !important;
}

.nav-item .nav-icon,
.nav-group-toggle .nav-icon {
  display: grid !important;
  place-items: center !important;
  width: 26px !important;
  height: 26px !important;
  border-radius: 7px !important;
  color: #7fd3ff !important;
  background: rgba(127, 211, 255, .12) !important;
  font-size: 14px !important;
  line-height: 1 !important;
}

.nav-item .nav-label,
.nav-group-toggle .nav-label {
  color: inherit !important;
  background: transparent !important;
}

.nav-item.active .nav-icon {
  color: #1266f1 !important;
  background: #ffffff !important;
}

.nav-group {
  display: grid;
  gap: 3px;
}

.nav-group-toggle {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 9px 10px 9px 16px;
  border: 0;
  border-radius: 6px;
  color: #cfe8ff;
  background: transparent;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
}

.nav-group-toggle:hover,
.nav-group.has-active .nav-group-toggle {
  color: #ffffff;
  background: rgba(255, 255, 255, .08);
}

.nav-chevron {
  color: #7fd3ff !important;
  background: transparent !important;
  font-size: 16px;
  text-align: center;
  transition: transform .18s ease;
}

.nav-group.open .nav-chevron {
  transform: rotate(45deg);
}

.nav-submenu {
  display: none;
  gap: 2px;
  padding-left: 18px;
}

.nav-group.open .nav-submenu {
  display: grid;
}

.nav-subitem {
  min-height: 32px !important;
  padding-top: 6px !important;
  padding-bottom: 6px !important;
  font-size: 12px !important;
}

.nav-subitem::before {
  inset-block: 5px !important;
}

.dashboard-heading {
  margin-bottom: 10px;
}

.dashboard-module-tabs {
  overflow-x: auto;
  flex-wrap: nowrap;
  scrollbar-width: thin;
  padding-bottom: 5px;
}

.dashboard-module-tabs .page-tab {
  flex: 0 0 auto;
  white-space: nowrap;
}

.dashboard-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, .85fr);
  gap: 12px;
}

.dashboard-bars {
  display: grid;
  gap: 13px;
}

.dashboard-bars article {
  display: grid;
  grid-template-columns: minmax(120px, .8fr) minmax(180px, 2fr) auto;
  align-items: center;
  gap: 10px;
}

.dashboard-bars article > strong {
  display: block;
  height: 15px;
  border: 1px solid #c7ddf6;
  border-radius: 999px;
  background: linear-gradient(90deg, #1266f1 var(--value), #edf6ff var(--value));
}

.dashboard-bars article > small {
  min-width: 52px;
  color: #63748a;
  text-align: right;
}

.dashboard-donut {
  width: 190px;
  aspect-ratio: 1;
  margin: 20px auto;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(#1266f1 0 48%, #23a8ff 48% 76%, #c7ddf6 76% 100%);
  box-shadow: inset 0 0 0 42px #ffffff, 0 16px 30px rgba(8, 35, 74, .12);
}

.dashboard-donut strong,
.dashboard-donut span {
  grid-area: 1 / 1;
  color: #08234a;
}

.dashboard-donut strong {
  margin-bottom: 24px;
  font-size: 28px;
}

.dashboard-donut span {
  margin-top: 28px;
  color: #63748a;
  font-size: 11px;
}

.vigilance-dashboard-donut {
  background: conic-gradient(#c9503f 0 34%, #f2a51a 34% 62%, #1266f1 62% 100%);
}

.dashboard-empty-chart {
  min-height: 180px;
  display: grid;
  place-items: center;
  padding: 20px;
  border: 1px dashed #b9d2ec;
  border-radius: 8px;
  background: #f7fbff;
  color: #63748a;
  text-align: center;
}

.catalogue-filter-bar {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr)) auto;
  align-items: end;
  gap: 8px;
  margin: 10px 0 14px;
  padding: 10px;
  border: 1px solid #d5e4f3;
  border-radius: 8px;
  background: #edf6ff;
}

.catalogue-filter-bar label {
  display: grid;
  gap: 4px;
  color: #0b3f78;
  font-size: 11px;
  font-weight: 800;
}

.catalogue-filter-bar input,
.catalogue-filter-bar select {
  width: 100%;
  min-height: 36px;
  border: 1px solid #b9d2ec;
  border-radius: 7px;
  background: #ffffff;
  color: #10233f;
}

.catalogue-site-link {
  text-decoration: none;
}

.catalogue-summary-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  margin: 0 0 8px;
  padding: 7px 9px;
  border: 1px solid #d5e4f3;
  border-radius: 8px;
  background: #f5f9fd;
}

.catalogue-summary-bar > span {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 28px;
  padding: 0 10px;
  border-right: 1px solid #d5e4f3;
  color: #5a7590;
  font-size: 11px;
  font-weight: 800;
}

.catalogue-summary-bar > span:last-child {
  border-right: 0;
}

.catalogue-summary-bar strong {
  color: #062a5f;
  font-size: 15px;
}

.catalogue-summary-bar i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #9aaec0;
}

.catalogue-summary-bar .connected i {
  background: #21a867;
  box-shadow: 0 0 0 4px rgba(33, 168, 103, 0.12);
}

#suppliers .catalogue-category-grid {
  display: flex;
  min-height: 40px;
  gap: 7px;
  overflow-x: auto;
  overflow-y: visible;
  margin-bottom: 8px;
  padding: 3px 0 4px;
}

#suppliers .catalogue-category {
  flex: 0 0 auto;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  padding: 0 13px;
  border-radius: 7px;
  box-shadow: none;
  white-space: nowrap;
}

#suppliers .catalogue-category strong {
  font-size: 11px;
}

#suppliers .catalogue-category.active {
  background: #1266f1;
  box-shadow: 0 5px 12px rgba(18, 102, 241, 0.18);
}

#suppliers .catalogue-filter-bar {
  margin-top: 0;
  margin-bottom: 8px;
  padding: 7px;
}

.catalogue-products-panel {
  padding-bottom: 18px;
}

.catalogue-cart-button {
  min-height: 30px;
  margin-left: auto;
  padding: 0 12px;
  font-size: 11px;
}

.catalogue-cart-button strong {
  min-width: 20px;
  height: 20px;
  display: inline-grid;
  place-items: center;
  margin-left: 5px;
  border-radius: 999px;
  background: #fff;
  color: #1266f1;
  font-size: 10px;
}

.catalogue-product-list {
  min-width: 920px;
}

.catalogue-product-row {
  min-height: 72px;
  display: grid;
  grid-template-columns: minmax(250px, 1.7fr) minmax(150px, 1fr) minmax(110px, .75fr) 110px 70px 118px;
  gap: 10px;
  align-items: center;
  padding: 7px 12px;
  border-bottom: 1px solid #e1ebf4;
  background: #fff;
  color: #4f6f89;
  font-size: 12px;
}

.catalogue-product-row:hover:not(.catalogue-product-head) {
  background: #f5faff;
}

.catalogue-product-head {
  min-height: 38px;
  position: sticky;
  top: 0;
  z-index: 2;
  background: #062a5f;
  color: #fff;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.catalogue-line-product {
  min-width: 0;
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.catalogue-line-product img {
  width: 62px;
  height: 56px;
  object-fit: contain;
  border: 1px solid #d8e5f1;
  border-radius: 6px;
  background: #fff;
}

.catalogue-line-product div {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.catalogue-line-product strong {
  overflow: hidden;
  color: #062a5f;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.catalogue-line-product small {
  display: -webkit-box;
  overflow: hidden;
  color: #70879d;
  font-size: 10px;
  line-height: 1.3;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.catalogue-line-price {
  display: grid;
  gap: 2px;
}

.catalogue-line-price strong {
  color: #062a5f;
  font-size: 12px;
}

.catalogue-line-price del {
  color: #91a3b4;
  font-size: 10px;
}

.catalogue-quantity {
  width: 58px;
  min-height: 34px;
  border: 1px solid #b9d2ec;
  border-radius: 6px;
  background: #fff;
  text-align: center;
}

.catalogue-line-actions {
  display: grid;
  grid-template-columns: 1fr 34px;
  gap: 5px;
}

.catalogue-line-actions .primary-button {
  min-height: 34px;
  padding: 0 8px;
  font-size: 10px;
}

.catalogue-line-actions .icon-button {
  width: 34px;
  min-width: 34px;
  height: 34px;
  text-decoration: none;
}

.catalogue-products-panel {
  overflow-x: auto;
}

.catalogue-cart-modal {
  width: min(820px, calc(100vw - 24px));
}

.catalogue-cart-list {
  max-height: min(430px, 55vh);
  display: grid;
  gap: 8px;
  overflow-y: auto;
  padding: 4px 2px 12px;
}

.catalogue-cart-item {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) 76px 100px 34px;
  gap: 9px;
  align-items: center;
  padding: 8px;
  border: 1px solid #d8e5f1;
  border-radius: 7px;
  background: #f7fbff;
}

.catalogue-cart-item img {
  width: 52px;
  height: 46px;
  object-fit: contain;
  border-radius: 5px;
  background: #fff;
}

.catalogue-cart-item div {
  min-width: 0;
  display: grid;
}

.catalogue-cart-item strong {
  color: #062a5f;
  font-size: 12px;
}

.catalogue-cart-item small {
  color: #70879d;
}

.catalogue-cart-item input {
  min-height: 34px;
}

.catalogue-cart-item .remove-cart-item {
  color: #c73d3d;
}

.catalogue-cart-total {
  display: flex;
  justify-content: flex-end;
  align-items: baseline;
  gap: 12px;
  padding: 12px 0;
  color: #637d96;
}

.catalogue-cart-total strong {
  color: #062a5f;
  font-size: 22px;
}

.catalogue-product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(235px, 1fr));
  gap: 16px;
  padding: 4px 18px 18px;
}

.catalogue-product-card {
  min-width: 0;
  display: grid;
  grid-template-rows: 190px minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid #d5e3f0;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(6, 42, 95, 0.08);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.catalogue-product-card:hover {
  transform: translateY(-3px);
  border-color: #8ab7ec;
  box-shadow: 0 16px 30px rgba(6, 42, 95, 0.14);
}

.catalogue-product-image {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #f4f8fc;
  border-bottom: 1px solid #e1ebf4;
}

.catalogue-product-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 10px;
  transition: transform 240ms ease;
}

.catalogue-product-card:hover .catalogue-product-image img {
  transform: scale(1.045);
}

.catalogue-product-image > span {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 5px 8px;
  border-radius: 999px;
  background: #e84242;
  color: #fff;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.catalogue-product-content {
  min-height: 230px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 14px;
}

.catalogue-product-meta {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.catalogue-product-meta span {
  max-width: 70%;
  overflow: hidden;
  color: #1266f1;
  font-size: 10px;
  font-weight: 900;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.catalogue-product-meta small {
  color: #66809a;
  font-weight: 800;
}

.catalogue-product-content h3 {
  margin: 0;
  color: #062a5f;
  font-size: 16px;
  line-height: 1.25;
}

.catalogue-product-content p {
  display: -webkit-box;
  overflow: hidden;
  margin: 0;
  color: #57738e;
  font-size: 12px;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.catalogue-product-price {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: auto;
}

.catalogue-product-price strong {
  color: #062a5f;
  font-size: 18px;
}

.catalogue-product-price del {
  color: #8ba0b4;
  font-size: 12px;
}

.catalogue-product-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 38px;
  gap: 8px;
}

.catalogue-product-actions .primary-button {
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  color: #fff;
  font-size: 12px;
  text-decoration: none;
}

.catalogue-product-actions .icon-button {
  width: 38px;
  min-width: 38px;
  height: 38px;
  background: #eaf3ff;
  color: #0b4fb8;
}

@media (max-width: 1100px) {
  .dashboard-detail-grid,
  .catalogue-filter-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (max-width: 720px) {
  .dashboard-detail-grid,
  .catalogue-filter-bar {
    grid-template-columns: 1fr;
  }

  .catalogue-product-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-bars article {
    grid-template-columns: 1fr auto;
  }

  .dashboard-bars article > strong {
    grid-column: 1 / -1;
  }
}

.need-files-field strong,
.need-files-field:hover strong {
  color: #ffffff !important;
  background: linear-gradient(135deg, #08234a, #1266f1) !important;
  border-color: #1266f1 !important;
}

.pe-table-tools input {
  background: #ffffff !important;
  border: 1px solid #b9d2ec !important;
  border-radius: 8px !important;
  padding: 9px 10px !important;
}

.pe-arbitrage-table tr.is-hidden {
  display: none !important;
}

@media (max-height: 760px) {
  .sidebar-logo-full {
    width: min(150px, 86%) !important;
    max-height: 58px !important;
  }

  .sidebar-card {
    padding: 8px !important;
  }

  .sidebar-card p {
    font-size: 10.8px !important;
  }
}

/* Inversion visuelle : menu clair, espace principal plus profond. */
.app-shell {
  background: linear-gradient(135deg, #d8f0ff 0%, #f7fbff 24%, #08234a 24%, #051a38 100%) !important;
}

.sidebar {
  background: linear-gradient(180deg, #d8f0ff 0%, #b9e2ff 52%, #eaf7ff 100%) !important;
  color: #08234a !important;
  border-right: 1px solid rgba(18, 102, 241, .18) !important;
  box-shadow: 16px 0 40px rgba(8, 35, 74, .12) !important;
}

.sidebar-logo-full {
  filter: drop-shadow(0 10px 18px rgba(8, 35, 74, .16)) !important;
}

.nav-item {
  color: #08234a !important;
  background: rgba(255, 255, 255, .42) !important;
  border-color: rgba(18, 102, 241, .18) !important;
}

.nav-item span {
  color: #ffffff !important;
  background: linear-gradient(135deg, #08234a, #1266f1) !important;
}

.nav-item:hover,
.nav-item.active {
  color: #ffffff !important;
  background: linear-gradient(135deg, #08234a, #1266f1) !important;
  box-shadow: 0 12px 24px rgba(18, 102, 241, .24) !important;
}

.nav-item:hover span,
.nav-item.active span {
  color: #08234a !important;
  background: #ffffff !important;
}

.sidebar-card {
  background: rgba(255, 255, 255, .62) !important;
  color: #08234a !important;
  border-color: rgba(18, 102, 241, .20) !important;
}

.sidebar-card .eyebrow,
.sidebar-card p {
  color: #08234a !important;
}

.main {
  background: linear-gradient(180deg, #0a2d61 0%, #061a38 46%, #f5f9fe 46%, #f5f9fe 100%) !important;
}

.topbar {
  background: rgba(255, 255, 255, .94) !important;
  border-color: rgba(185, 210, 236, .9) !important;
  box-shadow: 0 18px 40px rgba(8, 35, 74, .16) !important;
}

/* Nouveau besoin : colonne gauche foncee, formulaire bleu ciel. */
.need-modal {
  background: #071f43 !important;
}

.need-modal .modal-header {
  background: linear-gradient(135deg, #08234a, #0a2d61) !important;
  border-bottom: 1px solid rgba(127, 211, 255, .24) !important;
}

.need-modal .modal-header h2,
.need-modal .modal-header .eyebrow {
  color: #ffffff !important;
}

.need-modal form {
  background: linear-gradient(135deg, #071f43 0%, #071f43 34%, #d9f0ff 34%, #edf8ff 100%) !important;
  border-color: rgba(255, 255, 255, .18) !important;
}

.need-side-panel,
.selected-need-type {
  background: linear-gradient(180deg, #08234a, #061a38) !important;
  border-color: rgba(127, 211, 255, .22) !important;
  color: #ffffff !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08) !important;
}

.need-side-panel *,
.selected-need-type *,
.need-side-panel-header strong,
.need-side-panel-header span {
  color: #ffffff !important;
}

.need-side-panel label {
  background: rgba(255, 255, 255, .10) !important;
  border-color: rgba(127, 211, 255, .24) !important;
}

.need-side-panel select,
.need-side-panel input,
.need-side-panel textarea {
  background: rgba(255, 255, 255, .94) !important;
  color: #08234a !important;
  border-color: rgba(127, 211, 255, .55) !important;
}

.need-form-main,
.need-form-section,
.maintenance-scope-panel,
.typed-need-fields {
  background: #d9f0ff !important;
}

.need-form-section,
.maintenance-scope-panel {
  border-color: #a9d4ff !important;
  box-shadow: 0 12px 28px rgba(8, 35, 74, .08) !important;
}

.need-form-section label,
.maintenance-scope label,
.typed-need-fields label,
.need-modal input,
.need-modal select,
.need-modal textarea {
  background: #ffffff !important;
  border-color: #8fc5ff !important;
}

.need-category-header {
  background: #e9f6ff !important;
  border-color: #a9d4ff !important;
}

.field-group-title,
.section-mini-title,
.need-modal .section-mini-title {
  background: #08234a !important;
  color: #ffffff !important;
  border-color: #1266f1 !important;
}

.field-group-title *,
.section-mini-title *,
.need-modal .section-mini-title * {
  color: #ffffff !important;
}

/* Retour au theme precedent avec accueil organisation dans le menu. */
.app-shell {
  background: #f4f8fd !important;
}

.sidebar {
  background: linear-gradient(180deg, #08234a 0%, #061a38 100%) !important;
  color: #ffffff !important;
  border-right: 1px solid rgba(255, 255, 255, .10) !important;
  box-shadow: 16px 0 40px rgba(8, 35, 74, .18) !important;
}

.sidebar .brand {
  justify-content: stretch !important;
  padding: 2px 0 10px !important;
}

.sidebar-welcome {
  width: 100%;
  display: grid;
  gap: 4px;
  padding: 13px 12px;
  border: 1px solid rgba(127, 211, 255, .28);
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(255, 255, 255, .12), rgba(35, 168, 255, .10));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .10), 0 12px 24px rgba(0, 0, 0, .12);
}

.sidebar-welcome span {
  color: #7fd3ff !important;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.sidebar-welcome strong {
  color: #ffffff !important;
  font-size: 15px;
  line-height: 1.15;
}

.sidebar-welcome small {
  color: #d8f0ff !important;
  font-size: 11.5px;
  line-height: 1.25;
}

.sidebar-logo-full {
  display: none !important;
}

.nav-item {
  color: #d8f0ff !important;
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
}

.nav-item span {
  color: #7fd3ff !important;
  background: rgba(127, 211, 255, .14) !important;
}

.nav-item:hover,
.nav-item.active {
  color: #ffffff !important;
  background: rgba(255, 255, 255, .10) !important;
  border-color: transparent !important;
  box-shadow: inset 3px 0 0 #23a8ff !important;
}

.nav-item:hover span,
.nav-item.active span {
  color: #ffffff !important;
  background: linear-gradient(135deg, #1266f1, #23a8ff) !important;
}

.sidebar-card {
  background: rgba(255, 255, 255, .08) !important;
  color: #d8f0ff !important;
  border-color: rgba(255, 255, 255, .12) !important;
}

.sidebar-card .eyebrow {
  color: #7fd3ff !important;
}

.sidebar-card p {
  color: #d8f0ff !important;
}

.main {
  background: #f5f9fe !important;
}

.topbar {
  background: rgba(255, 255, 255, .94) !important;
  border-color: rgba(185, 210, 236, .9) !important;
  box-shadow: 0 18px 40px rgba(8, 35, 74, .10) !important;
}

.need-modal {
  background: #ffffff !important;
}

.need-modal .modal-header {
  background: #ffffff !important;
  border-bottom: 1px solid #d5e4f3 !important;
}

.need-modal .modal-header h2 {
  color: #08234a !important;
}

.need-modal .modal-header .eyebrow {
  color: #1266f1 !important;
}

.need-modal form {
  background: #f4f8fd !important;
  border-color: #d5e4f3 !important;
}

.need-side-panel,
.selected-need-type,
.need-form-main,
.need-form-section,
.maintenance-scope-panel,
.typed-need-fields {
  background: #f4f8fd !important;
  border-color: #d5e4f3 !important;
  color: #10233f !important;
}

.need-side-panel *,
.selected-need-type *,
.need-side-panel-header strong,
.need-side-panel-header span {
  color: #10233f !important;
}

.need-side-panel .eyebrow,
.need-side-panel-header span {
  color: #1266f1 !important;
}

.need-side-panel label,
.need-form-section label,
.maintenance-scope label,
.typed-need-fields label,
.need-modal input,
.need-modal select,
.need-modal textarea {
  background: #ffffff !important;
  border-color: #b9d2ec !important;
  color: #10233f !important;
}

.field-group-title,
.section-mini-title,
.need-modal .section-mini-title {
  background: #e5f1ff !important;
  border: 1px solid #b9d2ec !important;
  color: #08234a !important;
}

.field-group-title *,
.section-mini-title *,
.need-modal .section-mini-title * {
  color: #08234a !important;
}

.section-mini-title span,
.field-group-title span {
  background: #1266f1 !important;
  color: #ffffff !important;
}

/* Regles finales du menu lateral. */
.nav-item .nav-label,
.nav-group-toggle .nav-label {
  text-transform: uppercase !important;
  letter-spacing: .03em !important;
  color: inherit !important;
  background: transparent !important;
}

.sidebar-actions {
  position: sticky !important;
  bottom: -1px !important;
  z-index: 30 !important;
  margin-top: auto !important;
  display: grid !important;
  grid-template-columns: 48px minmax(0, 1fr) !important;
  gap: 8px !important;
  padding: 12px 0 2px !important;
  background: linear-gradient(180deg, rgba(6, 26, 56, 0), #061a38 20%) !important;
}

.sidebar-inbox-button {
  width: 44px !important;
  min-width: 44px !important;
  height: 42px !important;
  justify-content: center !important;
  padding: 0 !important;
}

.sidebar-inbox-button .inbox-icon {
  color: #ffffff !important;
  background: transparent !important;
  font-size: 21px !important;
}

.sidebar-actions .inbox-panel {
  top: auto !important;
  right: auto !important;
  bottom: calc(100% + 10px) !important;
  left: 0 !important;
}

.sidebar-need-button,
.sidebar-logout-button {
  width: 100% !important;
}

.sidebar-need-button {
  justify-content: center !important;
  animation: none !important;
}

.sidebar-logout-button {
  grid-column: 1 / -1 !important;
  min-height: 36px !important;
  color: #d8f0ff !important;
  border-color: rgba(255, 255, 255, .18) !important;
  background: rgba(255, 255, 255, .07) !important;
}

.topbar {
  min-height: 0 !important;
  padding-block: 8px !important;
  justify-content: flex-end !important;
}

.topbar:has(.topbar-actions:empty) {
  display: none !important;
}

.filters .chip.filter-all.active {
  color: #ffffff !important;
  background: linear-gradient(135deg, #061a38, #0b4fb8) !important;
  box-shadow: 0 0 0 3px rgba(18, 102, 241, .28), 0 10px 22px rgba(7, 59, 120, .22) !important;
}
.pe-catalogue-tab {
  margin-left: auto;
}

.pe-catalogue-pane {
  min-height: 0;
}

#pe-catalogue .catalogue-category-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr)) minmax(160px, 0.9fr);
  align-items: stretch;
}

#pe-catalogue .catalogue-cart-button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: #0b5ed7;
  color: #fff;
  box-shadow: 0 8px 18px rgba(11, 94, 215, 0.24);
}

#pe-catalogue .catalogue-cart-button strong {
  min-width: 25px;
  height: 25px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: #fff;
  color: #0b5ed7;
}

@media (max-width: 1100px) {
  #pe-catalogue .catalogue-category-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
.need-side-severity {
  margin-bottom: 12px;
}

.need-followup-modal {
  width: min(1080px, calc(100vw - 32px));
}

.need-record-tabs {
  margin: 14px 0 18px;
}

.need-response-tab {
  color: #146c43;
}

.need-response-tab.response-ready {
  background: #d9f4e5;
  border-color: #61bd88;
  color: #0c5c35;
  font-weight: 700;
}

.need-record-pane {
  display: none;
}

.need-record-pane.active {
  display: block;
}

.need-readonly-card {
  margin: 16px 0;
  padding: 18px;
  border: 1px solid #cbdbea;
  border-left: 4px solid #1689c7;
  background: #f4f8fc;
}

.need-readonly-card > span {
  display: block;
  margin-bottom: 8px;
  color: #60768b;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.need-readonly-card p {
  margin: 0;
  color: #18324a;
  line-height: 1.65;
  white-space: pre-wrap;
}

.need-response-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.need-response-summary article {
  padding: 13px;
  border: 1px solid #cae3d4;
  background: #effaf4;
}

.need-response-summary span,
.need-response-summary strong {
  display: block;
}

.need-response-summary span {
  margin-bottom: 5px;
  color: #557063;
  font-size: 12px;
}

.need-action-timeline {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}

.need-action-timeline article {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 12px;
  padding: 11px 13px;
  border-left: 3px solid #24a56a;
  background: #f5fbf8;
}

.need-action-timeline article span {
  color: #6a7d71;
  font-size: 12px;
}

.need-reply-composer {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(230px, 0.75fr);
  gap: 14px;
  margin-top: 16px;
  padding: 16px;
  background: #edf4fb;
  border: 1px solid #c9dbea;
}

.message-thread-preview article.biopartner-reply {
  border-left: 4px solid #1689c7;
  background: #edf6fb;
}

.message-thread-preview article.client-reply {
  border-left: 4px solid #8393a3;
  background: #f6f8fa;
}

.message-thread-preview article p {
  margin: 8px 0 0;
  line-height: 1.55;
}

.need-followup-feedback {
  min-height: 20px;
  margin-top: 10px;
  color: #0b5ed7;
  font-size: 13px;
  font-weight: 700;
}

@media (max-width: 780px) {
  .need-response-summary,
  .need-reply-composer {
    grid-template-columns: 1fr;
  }

  .need-action-timeline article {
    grid-template-columns: 1fr;
  }
}

/* Messagerie par conversations */
.messaging-header {
  align-items: center;
}

.messaging-header-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.messaging-header-actions .module-search {
  min-width: min(360px, 42vw);
}

.messaging-layout {
  min-height: 0;
}

.conversation-index-panel,
.conversation-thread-panel {
  height: min(650px, calc(100vh - 220px));
  min-height: 430px;
  overflow: hidden;
}

.conversation-table-head,
.conversation-row {
  display: grid;
  grid-template-columns: minmax(150px, .8fr) minmax(220px, 1.2fr) minmax(260px, 1.5fr) 110px;
  gap: 16px;
  align-items: center;
}

.conversation-table-head {
  padding: 11px 18px;
  border-bottom: 1px solid #d8e4ef;
  background: #eef5fb;
  color: #597087;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.conversation-index {
  max-height: calc(100vh - 300px);
  overflow-y: auto;
}

.conversation-row {
  width: 100%;
  min-height: 74px;
  padding: 14px 18px;
  border: 0;
  border-bottom: 1px solid #e3ebf2;
  background: #ffffff;
  color: #17314a;
  text-align: left;
  cursor: pointer;
  transition: background .18s ease, box-shadow .18s ease;
}

.conversation-row:nth-child(even) {
  background: #f2f6fa;
}

.conversation-row:hover,
.conversation-row:focus-visible {
  background: #f2f8fd;
  box-shadow: inset 4px 0 #1676d2;
  outline: none;
}

.conversation-row.has-unread {
  background: #edf6ff;
  box-shadow: inset 4px 0 #1676d2;
}

.conversation-reference,
.conversation-subject,
.conversation-preview {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 4px;
}

.conversation-reference strong,
.conversation-subject strong {
  overflow: hidden;
  color: #0b3765;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.conversation-reference small,
.conversation-subject small,
.conversation-preview {
  overflow: hidden;
  color: #6c8195;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.conversation-status {
  display: inline-flex;
  justify-content: center;
  min-width: 82px;
  padding: 6px 9px;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 800;
}

.conversation-status.unread {
  background: #dceeff;
  color: #0757a4;
}

.conversation-status.answered {
  background: #dff5ea;
  color: #137044;
}

.conversation-status.closed {
  background: #e7ebef;
  color: #5d6872;
}

.conversation-status.pending {
  background: #fff0d6;
  color: #925400;
}

.conversation-thread-panel {
  display: flex;
  flex-direction: column;
  padding: 0;
}

.conversation-thread-header {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 16px 18px;
  border-bottom: 1px solid #d8e4ef;
  background: #f3f8fc;
}

.conversation-back-button {
  display: inline-flex;
  min-height: 40px;
  padding: 0 13px;
  border: 1px solid #8bb4d8;
  border-radius: 6px;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  color: #0757a4;
  font-size: 13px;
  cursor: pointer;
  box-shadow: 0 5px 14px rgba(7, 87, 164, .1);
}

.conversation-back-button span {
  font-size: 21px;
  line-height: 1;
}

.conversation-back-button:hover,
.conversation-back-button:focus-visible {
  border-color: #0757a4;
  background: #eaf4fd;
  outline: none;
}

.conversation-thread-header > div {
  min-width: 0;
  flex: 1;
}

.conversation-thread-header h3 {
  margin: 2px 0 0;
  overflow: hidden;
  color: #0b3765;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.conversation-thread {
  min-height: 0;
  flex: 1;
  overflow-y: auto;
}

.conversation-bubbles {
  display: flex;
  min-height: 180px;
  padding: 18px 22px;
  flex-direction: column;
  gap: 15px;
  background: #f5f8fb;
}

.message-bubble {
  width: min(72%, 680px);
  padding: 13px 15px;
  border-radius: 7px;
  box-shadow: 0 4px 14px rgba(17, 48, 76, .08);
}

.message-bubble.client {
  align-self: flex-start;
  border: 1px solid #d8e0e7;
  background: #e8edf1;
  color: #283b4d;
}

.message-bubble.biopartner {
  align-self: flex-end;
  border: 1px solid #176cc0;
  background: #0c5fad;
  color: #ffffff;
}

.message-bubble-meta {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 7px;
  font-size: 12px;
}

.message-bubble.client .message-bubble-meta {
  color: #617587;
}

.message-bubble.biopartner .message-bubble-meta {
  color: #dceeff;
}

.message-bubble.received {
  align-self: flex-start;
  border: 1px solid #d8e0e7;
  background: #e8edf1;
  color: #283b4d;
}

.message-bubble.sent {
  align-self: flex-end;
  border: 1px solid #176cc0;
  background: #0c5fad;
  color: #ffffff;
}

.message-bubble.received .message-bubble-meta {
  color: #617587;
}

.message-bubble.sent .message-bubble-meta {
  color: #dceeff;
}

.message-bubble p {
  margin: 0;
  line-height: 1.55;
  white-space: pre-wrap;
}

.message-attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 11px;
}

.message-attachments a {
  display: inline-flex;
  min-width: 0;
  max-width: 100%;
  padding: 7px 9px;
  border: 1px solid currentColor;
  border-radius: 5px;
  align-items: center;
  gap: 7px;
  color: inherit;
  font-size: 12px;
  text-decoration: none;
}

.message-attachments a:hover,
.message-attachments a:focus-visible {
  background: rgba(255, 255, 255, .18);
  outline: none;
}

.message-attachments strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.conversation-reply-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
  padding: 12px 18px 14px;
  border-top: 1px solid #d8e4ef;
  background: #ffffff;
}

.conversation-reply-form textarea {
  min-height: 54px;
  max-height: 110px;
  resize: vertical;
}

.conversation-reply-actions {
  display: flex;
  gap: 8px;
  align-items: flex-end;
  justify-content: flex-end;
  margin: 0;
}

.conversation-close-button {
  border-color: #bd3541;
  color: #a51f2c;
}

.new-conversation-modal {
  width: min(1180px, calc(100vw - 48px));
  max-width: none;
}

.new-conversation-modal .modal-card {
  width: min(1180px, calc(100vw - 48px));
  max-height: min(88vh, 860px);
  overflow-y: auto;
}

.new-conversation-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

.new-conversation-grid .wide-field {
  grid-column: 1 / -1;
}

.new-conversation-modal #messageComposeBody {
  min-height: 190px;
  resize: vertical;
}

.new-conversation-modal .modal-actions {
  position: sticky;
  bottom: 0;
  margin: 8px -2px -2px;
  padding: 14px 2px 2px;
  background: #ffffff;
}

.message-record-results {
  position: absolute;
  z-index: 8;
  display: none;
  width: 100%;
  max-height: 230px;
  overflow-y: auto;
  border: 1px solid #b9cde0;
  background: #ffffff;
  box-shadow: 0 12px 26px rgba(16, 48, 77, .16);
}

.message-record-results.is-open {
  display: block;
}

#messageLinkedRecordField {
  position: relative;
}

.message-record-results button {
  display: grid;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-bottom: 1px solid #e2eaf1;
  background: #ffffff;
  color: #17314a;
  text-align: left;
  cursor: pointer;
}

.message-record-results button:nth-child(even) {
  background: #f3f7fa;
}

.message-record-results button:hover {
  background: #e7f2fc;
}

.message-record-results button span {
  margin-top: 3px;
  color: #687e92;
  font-size: 12px;
}

#messageLinkedRecordSelection {
  display: block;
  margin-top: 6px;
  color: #637b91;
}

@media (max-width: 980px) {
  .conversation-table-head {
    display: none;
  }

  .conversation-row {
    grid-template-columns: 1fr auto;
  }

  .conversation-preview {
    grid-column: 1 / -1;
  }

  .message-bubble {
    width: 88%;
  }
}

@media (max-width: 620px) {
  .messaging-header-actions,
  .new-conversation-grid {
    grid-template-columns: 1fr;
    align-items: stretch;
    flex-direction: column;
  }

  .messaging-header-actions .module-search {
    min-width: 0;
    width: 100%;
  }

  .conversation-row {
    grid-template-columns: 1fr;
  }

  .conversation-reply-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .conversation-reply-form {
    grid-template-columns: 1fr;
  }

  .conversation-back-button {
    width: 42px;
    padding: 0;
    justify-content: center;
  }

  .conversation-back-button strong {
    display: none;
  }

  .new-conversation-modal .modal-card {
    width: calc(100vw - 20px);
    max-height: 92vh;
  }

  .new-conversation-modal {
    width: calc(100vw - 20px);
  }

  .new-conversation-grid .wide-field {
    grid-column: auto;
  }

  .message-bubble {
    width: 94%;
  }
}

/* Abonnements et activation commerciale */
.subscription-presentation-banner {
  display: flex;
  gap: 18px;
  align-items: center;
  justify-content: space-between;
  margin: 0 24px 16px;
  padding: 16px 18px;
  border: 1px solid #efc16e;
  background: #fff7e8;
  color: #6f4707;
}

.subscription-presentation-banner strong,
.subscription-presentation-banner p {
  display: block;
  margin: 3px 0 0;
}

.subscription-change-card {
  display: flex;
  gap: 20px;
  align-items: center;
  justify-content: space-between;
  margin-top: 18px;
  padding: 18px;
  border: 1px solid #b9d5ed;
  background: #edf6fc;
}

.subscription-change-card strong,
.subscription-change-card p {
  display: block;
  margin: 4px 0 8px;
}

.offer-change-modal {
  width: min(1440px, calc(100vw - 20px));
  max-width: none;
  height: calc(100vh - 20px);
  max-height: none;
  overflow: hidden;
  background: #f4f8fc;
}

.offer-change-modal .offer-change-page {
  width: 100%;
  height: 100%;
  padding: 0;
  gap: 0;
  overflow: auto;
  background: #f4f8fc;
}

.offer-change-header {
  position: sticky;
  z-index: 3;
  top: 0;
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr) 44px;
  align-items: center;
  gap: 28px;
  min-height: 124px;
  padding: 20px 30px;
  border-bottom: 1px solid #d8e4ee;
  background: rgba(255, 255, 255, .97);
}

.offer-change-header img {
  width: 176px;
  max-height: 74px;
  object-fit: contain;
  object-position: left center;
}

.offer-change-header h2,
.offer-change-header p {
  margin: 3px 0;
}

.offer-change-header h2 {
  color: #082a59;
  font-size: clamp(22px, 2vw, 32px);
}

.offer-change-header p {
  color: #60758a;
}

.offer-change-header .icon-button {
  align-self: start;
}

.offer-change-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 24px;
  width: min(1320px, calc(100% - 48px));
  margin: 0 auto;
  padding: 26px 0 32px;
}

.offer-change-main {
  min-width: 0;
}

.current-offer-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 19px 22px;
  border-left: 5px solid #0c6db6;
  background: #082a59;
  color: #ffffff;
}

.current-offer-banner strong,
.current-offer-banner p,
.current-offer-price span {
  display: block;
}

.current-offer-banner strong {
  margin-top: 4px;
  font-size: 23px;
}

.current-offer-banner p {
  margin: 4px 0 0;
  color: #d2e3f2;
}

.current-offer-label {
  color: #72c8f3;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.current-offer-price {
  flex: 0 0 auto;
  text-align: right;
}

.current-offer-price b {
  font-size: 25px;
}

.current-offer-price span {
  color: #d2e3f2;
  font-size: 12px;
}

.offer-change-intro {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin: 26px 0 14px;
}

.offer-change-intro h3,
.offer-change-intro p {
  margin: 4px 0 0;
}

.offer-change-intro h3 {
  color: #082a59;
  font-size: 22px;
}

.offer-change-intro p {
  max-width: 420px;
  color: #65798d;
  text-align: right;
}

.offer-change-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.offer-change-option {
  position: relative;
  display: block;
  cursor: pointer;
}

.offer-change-option > input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.offer-change-card {
  display: flex;
  min-height: 390px;
  padding: 22px;
  border: 1px solid #c7d8e7;
  border-radius: 8px;
  flex-direction: column;
  background: #ffffff;
  box-shadow: 0 10px 30px rgba(8, 42, 89, .07);
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.offer-change-option:hover .offer-change-card {
  border-color: #5c9bcb;
  transform: translateY(-2px);
}

.offer-change-option > input:focus-visible + .offer-change-card {
  outline: 3px solid rgba(19, 123, 193, .25);
  outline-offset: 3px;
}

.offer-change-option > input:checked + .offer-change-card {
  border-color: #0b67b2;
  box-shadow: inset 0 0 0 2px #0b67b2, 0 14px 34px rgba(8, 42, 89, .13);
}

.offer-change-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.offer-change-badge {
  padding: 6px 9px;
  border-radius: 4px;
  background: #e7f2fb;
  color: #0b5d9c;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.offer-choice-indicator {
  width: 20px;
  height: 20px;
  border: 2px solid #abc3d8;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: inset 0 0 0 4px #ffffff;
}

.offer-change-option > input:checked + .offer-change-card .offer-choice-indicator {
  border-color: #0b67b2;
  background: #0b67b2;
}

.offer-change-card > strong {
  margin-top: 22px;
  color: #082a59;
  font-size: 27px;
}

.offer-change-price {
  display: flex;
  align-items: baseline;
  gap: 7px;
  margin: 7px 0 18px;
}

.offer-change-price b {
  color: #0b67b2;
  font-size: 28px;
}

.offer-change-price small {
  color: #61778b;
}

.offer-change-card ul {
  display: grid;
  gap: 11px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.offer-change-card li {
  position: relative;
  padding-left: 25px;
  color: #3f566c;
  line-height: 1.4;
}

.offer-change-card li::before {
  position: absolute;
  top: 1px;
  left: 0;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: #dceefa;
  color: #0b67b2;
  content: "\2713";
  font-size: 11px;
  font-weight: 900;
  line-height: 17px;
  text-align: center;
}

.offer-select-label {
  margin-top: auto;
  padding-top: 20px;
  color: #0b67b2;
  font-weight: 800;
}

.offer-change-option > input:checked + .offer-change-card .offer-select-label::after {
  content: " - Offre sélectionnée";
}

.offer-change-summary {
  position: sticky;
  top: 150px;
  align-self: start;
  padding: 23px;
  border: 1px solid #bfd4e5;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 12px 34px rgba(8, 42, 89, .09);
}

.offer-change-summary h3 {
  margin: 7px 0;
  color: #082a59;
  font-size: 23px;
}

.offer-change-summary > p {
  margin: 0 0 18px;
  color: #5c7185;
}

.offer-effective-date {
  padding: 15px;
  border: 1px solid #b9d5ed;
  border-radius: 6px;
  background: #eef7fd;
}

.offer-effective-date span,
.offer-effective-date strong,
.offer-effective-date small {
  display: block;
}

.offer-effective-date span {
  color: #5b7186;
  font-size: 12px;
  font-weight: 700;
}

.offer-effective-date strong {
  margin: 4px 0;
  color: #082a59;
  font-size: 24px;
}

.offer-effective-date small {
  color: #637b8f;
}

.offer-document-notice {
  margin: 15px 0;
  padding: 15px;
  border-left: 4px solid #15a7c5;
  background: #f4f9fc;
}

.offer-document-notice strong {
  color: #082a59;
}

.offer-document-notice p,
.offer-document-notice span {
  display: block;
  margin: 5px 0 0;
  color: #61768a;
  font-size: 13px;
  line-height: 1.45;
}

.offer-change-comment {
  display: grid;
  gap: 7px;
  color: #233f5b;
  font-weight: 700;
}

.offer-change-comment textarea {
  min-height: 82px;
  resize: vertical;
}

.offer-change-summary menu {
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  gap: 9px;
  margin: 17px 0 0;
  padding: 0;
}

.offer-change-summary menu button {
  width: 100%;
}

.offer-change-summary .primary-button:disabled {
  opacity: .48;
  cursor: not-allowed;
}

.purchase-order-notice {
  padding: 20px;
  border: 1px solid #c9ddeb;
  background: #f2f8fc;
  text-align: center;
}

.purchase-order-notice img {
  width: 210px;
  max-width: 70%;
}

.purchase-order-notice > strong {
  display: block;
  margin: 16px auto;
  padding: 12px;
  border: 1px dashed #0b67b2;
  background: #ffffff;
  color: #082a59;
  font-size: 20px;
}

.admin-subscription-panel {
  margin-bottom: 18px;
}

.admin-subscription-row {
  display: grid;
  grid-template-columns: 1.35fr .8fr .9fr .75fr 1fr;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border-bottom: 1px solid #dce6ef;
}

.admin-subscription-row:nth-child(odd):not(.head) {
  background: #f3f7fa;
}

.admin-subscription-row.head {
  background: #e9f2f9;
  color: #536d83;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.admin-subscription-row span {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 4px;
}

.admin-subscription-row .row-actions {
  flex-direction: row;
  flex-wrap: wrap;
}

@media (max-width: 900px) {
  .offer-change-modal {
    width: calc(100vw - 10px);
    height: calc(100vh - 10px);
  }

  .offer-change-header {
    position: relative;
    grid-template-columns: minmax(0, 1fr) 42px;
    gap: 12px;
    padding: 16px 18px;
  }

  .offer-change-header img {
    width: 145px;
  }

  .offer-change-header > div {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .offer-change-header .icon-button {
    grid-column: 2;
    grid-row: 1;
  }

  .offer-change-content {
    grid-template-columns: 1fr;
    width: calc(100% - 28px);
    padding: 18px 0 24px;
  }

  .offer-change-options {
    grid-template-columns: 1fr;
  }

  .offer-change-summary {
    position: static;
  }

  .admin-subscription-row {
    grid-template-columns: 1fr 1fr;
  }

  .admin-subscription-row.head {
    display: none;
  }
}

@media (max-width: 600px) {
  .current-offer-banner,
  .offer-change-intro {
    align-items: flex-start;
    flex-direction: column;
  }

  .current-offer-price,
  .offer-change-intro p {
    text-align: left;
  }

  .offer-change-card {
    min-height: 0;
  }

  .offer-change-summary menu {
    grid-template-columns: 1fr;
  }
}

/* Correctif final : aucun sous-menu ne recouvre les boutons places plus bas. */
.sidebar {
  min-height: 0 !important;
  gap: 10px !important;
  overflow: hidden !important;
}

.sidebar .brand {
  flex: 0 0 auto !important;
}

.sidebar .nav-list {
  min-height: 0 !important;
  flex: 1 1 auto !important;
  align-content: start !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  padding: 2px 5px 12px 0 !important;
  scrollbar-gutter: stable;
}

.sidebar .nav-group,
.sidebar .nav-submenu {
  position: static !important;
  width: 100% !important;
}

.sidebar .nav-group.open .nav-submenu {
  display: grid !important;
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
}

.sidebar .sidebar-actions {
  position: relative !important;
  bottom: auto !important;
  z-index: 2 !important;
  flex: 0 0 auto !important;
  margin-top: 0 !important;
  padding-top: 10px !important;
  border-top: 1px solid rgba(127, 211, 255, .16) !important;
  background: #061a38 !important;
}

.sidebar .nav-list::-webkit-scrollbar {
  width: 6px;
}

.sidebar .nav-list::-webkit-scrollbar-thumb {
  border-radius: 6px;
  background: rgba(127, 211, 255, .32);
}

/* Verrou responsive final, placé après tous les anciens thèmes. */
@media (max-width: 1100px) {
  .app-shell {
    display: block !important;
    grid-template-columns: none !important;
    width: 100vw !important;
    height: 100dvh !important;
    padding-top: 58px !important;
    overflow: hidden !important;
  }

  .mobile-app-bar {
    display: grid !important;
  }

  .app-shell > .sidebar {
    position: fixed !important;
    z-index: 8400 !important;
    top: 0 !important;
    right: auto !important;
    bottom: 0 !important;
    left: 0 !important;
    width: min(330px, 88vw) !important;
    max-width: 88vw !important;
    height: 100dvh !important;
    transform: translate3d(-105%, 0, 0) !important;
    transition: transform .24s ease !important;
  }

  .app-shell.mobile-menu-open > .sidebar {
    transform: translate3d(0, 0, 0) !important;
  }

  .app-shell > .main {
    width: 100vw !important;
    max-width: 100vw !important;
    height: calc(100dvh - 58px) !important;
    margin: 0 !important;
    padding: 10px 12px 14px !important;
  }

  .app-shell > .main > .view.active {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
  }

  .mobile-sidebar-backdrop {
    display: block !important;
    z-index: 8300 !important;
  }

  .metrics-grid,
  .cards-grid,
  #dash-indicators .metrics-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .content-grid,
  .supplier-layout,
  .messages-layout,
  .tenant-layout,
  .inventory-layout,
  .settings-layout,
  .contract-layout,
  .dashboard-detail-grid,
  .charts-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }
}

@media (max-width: 700px) {
  .app-shell > .main {
    padding: 8px !important;
  }

  .metrics-grid,
  .cards-grid,
  #dash-indicators .metrics-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }
}

/* Dernière règle : présentation identique de tous les libellés du menu. */
.app-shell > .sidebar .nav-item,
.app-shell > .sidebar .nav-group-toggle,
.app-shell > .sidebar .nav-subitem {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
  font-size: 12px !important;
  font-weight: 750 !important;
  letter-spacing: 0 !important;
  line-height: 1.2 !important;
  text-transform: uppercase !important;
}

.app-shell > .sidebar .nav-label {
  font: inherit !important;
  letter-spacing: 0 !important;
  text-transform: uppercase !important;
}
