: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;
}

.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;
}

.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) {
  .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: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-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;
}

.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);
}

.incoming-message-popup {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 80;
  width: min(360px, calc(100vw - 36px));
  padding: 15px 44px 15px 16px;
  border: 1px solid #fecaca;
  border-left: 5px solid #dc2626;
  border-radius: 8px;
  color: #123047;
  background: #ffffff;
  box-shadow: 0 20px 46px rgba(80, 25, 25, .22);
  animation: incomingMessageSlide 260ms ease-out;
}

.incoming-message-popup .icon-button {
  position: absolute;
  top: 8px;
  right: 8px;
}

.incoming-message-popup strong,
.incoming-message-popup p {
  display: block;
}

.incoming-message-popup p {
  margin: 8px 0 12px;
  color: var(--muted);
  line-height: 1.45;
}

@keyframes incomingMessageSlide {
  from { opacity: 0; transform: translateY(-12px); }
  to { 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-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;
}

@media (max-width: 1100px) {
  .dashboard-detail-grid,
  .catalogue-filter-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .dashboard-detail-grid,
  .catalogue-filter-bar {
    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;
}
