html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 82% -20%, rgba(31, 111, 235, .12), transparent 34%),
    #0d1524;
  --bs-body-color: #f8fafc;
  --bs-body-bg: #0d1524;
  --bs-secondary-color: #a8b8cc;
  --bs-tertiary-color: #91a4bd;
  color-scheme: dark;
  color: #f8fafc;
  font-family: Inter, "Segoe UI", Roboto, Arial, sans-serif;
}

a { color: #72b4ff; }
a:hover { color: #a8d2ff; }

.bg-nova {
  background: rgba(8, 15, 28, .96);
  border-color: #1d2a3e !important;
}

.nova-header {
  position: sticky;
  z-index: 1030;
  top: 0;
  border-bottom: 1px solid #1d2a3e;
  box-shadow: 0 8px 28px rgba(0, 0, 0, .18);
  backdrop-filter: blur(14px);
}

.nova-header .navbar { min-height: 66px; }
.nova-main { min-height: calc(100vh - 112px); padding: 2rem clamp(1rem, 2vw, 2.5rem) 3rem; }
.nova-footer { padding: 1rem 2rem; border-top: 1px solid #1d2a3e; color: #6f829d; font-size: .8rem; }

.navbar-brand {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  margin-right: 1.25rem;
  letter-spacing: .1rem;
  font-weight: 850;
}

.brand-mark,
.building-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: linear-gradient(145deg, #2587ff, #0d5cce);
  color: #fff;
  font-size: .88rem;
  font-weight: 900;
  box-shadow: 0 8px 20px rgba(20, 120, 255, .25);
}

.navbar .nav-link {
  padding: .6rem .62rem !important;
  color: #a9b7ca;
  font-size: .88rem;
  white-space: nowrap;
}
.navbar .nav-link:hover { color: #fff; }

.context-switchers {
  display: flex;
  align-items: flex-end;
  gap: .55rem;
  margin-right: .75rem;
}
.context-switchers form { display: grid; gap: .15rem; }
.context-switchers label { color: #6f829d; font-size: .65rem; font-weight: 800; letter-spacing: .05rem; text-transform: uppercase; }
.context-switchers .form-select { min-width: 170px; max-width: 230px; border-color: #30445f; background-color: #111c2e; }

.eyebrow {
  margin: 0 0 .45rem;
  color: #7ea9e6;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .09rem;
  text-transform: uppercase;
}
.page-subtitle { margin: .45rem 0 0; color: #91a4bd; }

.dashboard-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
  padding: 1.65rem 1.8rem;
  border: 1px solid #243752;
  border-radius: 15px;
  background:
    linear-gradient(115deg, rgba(25, 112, 236, .16), rgba(19, 32, 51, .25) 48%),
    #131e2f;
  box-shadow: 0 22px 45px rgba(0, 0, 0, .16);
}
.dashboard-hero h1 { margin: 0; font-size: clamp(1.75rem, 3vw, 2.55rem); font-weight: 780; letter-spacing: -.035em; }
.dashboard-hero p:last-child { margin: .55rem 0 0; color: #a8b8cd; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .6rem; }

.nova-assistant-entry {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr) auto;
  align-items: center;
  gap: 1.25rem;
  margin: 1.25rem 0;
  padding: 1rem;
  border: 1px solid #294866;
  border-radius: 16px;
  background: linear-gradient(120deg, #111f31, #101a28);
}
.nova-assistant-entry h2 { margin: 0 0 .3rem; }
.nova-assistant-entry p:last-child { margin: 0; color: #99abc1; }
.nova-assistant-portrait {
  height: 92px;
  padding: 0;
  overflow: hidden;
  border: 1px solid #257fd1;
  border-radius: 13px;
  background: #07111d;
  cursor: pointer;
  box-shadow: 0 0 0 0 rgba(37, 135, 255, 0);
  transition: transform .18s ease, box-shadow .18s ease;
}
.nova-assistant-portrait:hover, .nova-assistant-portrait:focus-visible { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(37, 135, 255, .3); }
.nova-assistant-portrait img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
.nova-assistant-modal .modal-content { border: 1px solid #355373; background: #111a28; }
.nova-assistant-search { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .65rem; }
.nova-assistant-search .form-control { min-height: 48px; }
.nova-assistant-examples { display: flex; flex-wrap: wrap; gap: .45rem; margin: .75rem 0 1rem; }
.nova-assistant-status { min-height: 28px; color: #9eb2ca; }
.nova-result-group { margin-top: 1.15rem; }
.nova-result-group h3 { margin-bottom: .65rem; color: #e9f3ff; font-size: 1rem; }
.nova-result-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem; }
.nova-result-card { display: flex; flex-direction: column; min-width: 0; padding: .85rem; border: 1px solid #2b405c; border-radius: 11px; background: #142235; }
.nova-result-card h4 { margin: .55rem 0 .25rem; font-size: .94rem; overflow-wrap: anywhere; }
.nova-result-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.nova-result-status, .nova-result-meta { color: #8fa5bf; font-size: .72rem; }
.nova-result-subtitle, .nova-result-description { margin: 0 0 .35rem; color: #b0c0d2; font-size: .8rem; overflow-wrap: anywhere; }
.nova-result-description { color: #8399b2; }
.nova-result-card .btn { align-self: flex-start; margin-top: auto; }
.nova-result-meta { display: block; margin: .25rem 0 .65rem; }

@media (max-width: 767.98px) {
  .nova-assistant-entry { grid-template-columns: 88px minmax(0, 1fr); gap: .8rem; }
  .nova-assistant-entry > .btn { grid-column: 1 / -1; width: 100%; }
  .nova-assistant-portrait { height: 88px; }
  .nova-assistant-modal .modal-dialog { width: 100%; max-width: none; height: 100%; margin: 0; }
  .nova-assistant-modal .modal-content { min-height: 100%; border-radius: 0; }
  .nova-result-grid { grid-template-columns: 1fr; }
}

@media (max-width: 420px) {
  .nova-assistant-entry { grid-template-columns: 72px minmax(0, 1fr); padding: .8rem; }
  .nova-assistant-portrait { height: 72px; }
  .nova-assistant-search { grid-template-columns: 1fr; }
  .nova-assistant-search .btn { min-height: 46px; }
  .nova-assistant-examples .btn { flex: 1 1 140px; min-height: 42px; white-space: normal; }
  .nova-assistant-modal .modal-header, .nova-assistant-modal .modal-body, .nova-assistant-modal .modal-footer { padding-inline: .85rem; }
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(145px, 1fr));
  gap: .85rem;
  margin-bottom: 2rem;
}
.metric-card {
  display: flex;
  align-items: center;
  gap: .8rem;
  min-height: 92px;
  padding: 1rem;
  border: 1px solid #263a56;
  border-radius: 12px;
  background: #151f2e;
  color: #f8fafc;
  text-decoration: none;
  transition: transform .16s ease, border-color .16s ease, background .16s ease;
}
.metric-card:hover { transform: translateY(-2px); border-color: #436892; background: #192638; color: #fff; }
.metric-card.is-alert { border-color: rgba(249, 115, 22, .65); }
.metric-card.is-warning { border-color: rgba(245, 184, 24, .55); }
.metric-card small { display: block; min-height: 34px; color: #8ea2bb; font-size: .76rem; line-height: 1.25; }
.metric-card strong { display: block; margin-top: .25rem; font-size: 1.75rem; line-height: 1; }
.metric-icon { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 38px; width: 38px; height: 38px; border-radius: 10px; font-size: .74rem; font-weight: 900; }
.metric-icon.blue { background: rgba(37, 135, 255, .16); color: #69adff; }
.metric-icon.orange { background: rgba(249, 115, 22, .15); color: #fb923c; }
.metric-icon.cyan { background: rgba(6, 182, 212, .15); color: #22d3ee; }
.metric-icon.amber { background: rgba(245, 184, 24, .15); color: #facc15; }
.metric-icon.violet { background: rgba(139, 92, 246, .15); color: #a78bfa; }
.metric-icon.green { background: rgba(34, 197, 94, .15); color: #4ade80; }

.dashboard-section { margin: 2rem 0; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.section-heading h2 { margin: 0; font-size: 1.25rem; font-weight: 750; }
.section-heading.compact { align-items: center; margin-bottom: .8rem; }
.section-heading.compact > a:not(.btn), .section-heading.compact > span { color: #79aaf0; font-size: .82rem; text-decoration: none; }

.site-card-grid { display: grid; grid-template-columns: repeat(4, minmax(220px, 1fr)); gap: 1rem; }
.site-card {
  display: flex;
  flex-direction: column;
  min-height: 250px;
  padding: 1.15rem;
  border: 1px solid #2a3d59;
  border-radius: 14px;
  background: linear-gradient(155deg, #182536, #121c2b);
  color: #f8fafc;
  text-decoration: none;
  box-shadow: 0 16px 35px rgba(0, 0, 0, .12);
  transition: transform .17s ease, border-color .17s ease, box-shadow .17s ease;
}
.site-card:hover { transform: translateY(-3px); border-color: #3d72aa; box-shadow: 0 22px 42px rgba(0, 0, 0, .2); color: #fff; }
.site-card-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.health-dot { width: 10px; height: 10px; border-radius: 999px; box-shadow: 0 0 0 5px rgba(34, 197, 94, .08); }
.health-dot.ok { background: #22c55e; }
.health-dot.danger { background: #f97316; box-shadow: 0 0 0 5px rgba(249, 115, 22, .1); }
.site-client { margin: 0 0 .35rem; color: #7ea9e6; font-size: .74rem; font-weight: 750; text-transform: uppercase; }
.site-card h3 { margin: 0; font-size: 1.15rem; font-weight: 760; }
.site-address { min-height: 42px; margin: .45rem 0 1rem; color: #94a6bc; font-size: .86rem; }
.site-stats { display: flex; flex-wrap: wrap; gap: .6rem 1rem; padding-top: .8rem; border-top: 1px solid #293b55; color: #9aacc2; font-size: .78rem; }
.site-stats strong { color: #f8fafc; }
.site-next { display: flex; align-items: end; justify-content: space-between; gap: .5rem; margin-top: auto; padding-top: 1rem; font-size: .75rem; }
.site-next span { color: #7e91aa; }
.site-next strong { font-size: .8rem; }

.dashboard-columns { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin-top: 2rem; }
.dashboard-panel {
  padding: 1rem;
  border: 1px solid #263a56;
  border-radius: 13px;
  background: #141f2e;
  box-shadow: 0 16px 35px rgba(0, 0, 0, .1);
}
.clean-list { display: grid; gap: .35rem; }
.clean-list > a, .clean-list-item { display: flex; align-items: center; justify-content: space-between; gap: .8rem; padding: .72rem; border-radius: 9px; color: #eef4ff; text-decoration: none; }
.clean-list > a:hover { background: #1d2c41; }
.clean-list span > strong, .clean-list span > small { display: block; }
.clean-list small { margin-top: .2rem; color: #879ab2; font-size: .76rem; }
.date-chip { min-width: 48px; padding: .28rem .4rem; border-radius: 7px; background: #22334b; color: #b9d4f7; font-size: .75rem; font-weight: 800; text-align: center; }
.empty-state { display: grid; place-items: center; min-height: 170px; padding: 1.5rem; border: 1px dashed #355171; border-radius: 13px; color: #8295ad; text-align: center; }
.empty-state strong { color: #e7eef8; }
.empty-inline { padding: 1rem; color: #7f92aa; font-size: .86rem; text-align: center; }

.client-grid { display: grid; grid-template-columns: repeat(3, minmax(260px, 1fr)); gap: 1rem; }
.client-card { min-height: 215px; padding: 1.2rem; border: 1px solid #293e5b; border-radius: 14px; background: #151f2e; color: #f8fafc; text-decoration: none; transition: .16s ease; }
.client-card:hover { transform: translateY(-2px); border-color: #4776ad; color: #fff; }
.client-card-head { display: flex; align-items: center; justify-content: space-between; }
.client-avatar { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 12px; background: linear-gradient(145deg, #244d80, #172d4a); color: #a9d1ff; font-weight: 900; }
.client-card h2 { margin: 1rem 0 .4rem; font-size: 1.2rem; }
.client-card p { min-height: 42px; color: #91a4bc; }
.client-card-stats { display: flex; gap: 1.2rem; padding-top: .8rem; border-top: 1px solid #293b55; color: #93a6bd; font-size: .82rem; }
.client-card-stats strong { color: #f8fafc; }
.client-site-group { margin-bottom: 2rem; }

.detail-summary-grid, .site-detail-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.large-stat { font-size: 2.1rem; font-weight: 800; }
.site-detail-metrics > div,
.site-detail-metrics > a {
  padding: 1rem;
  border: 1px solid #2b405e;
  border-radius: 12px;
  background: #151f2e;
}
.site-detail-metrics > a { color: #f8fafc; text-decoration: none; transition: border-color .16s ease, transform .16s ease, background .16s ease; }
.site-detail-metrics > a:hover { transform: translateY(-2px); border-color: #4978ad; background: #18263a; }
.site-detail-metrics > div.is-alert,
.site-detail-metrics > a.is-alert { border-color: rgba(249, 115, 22, .6); }
.site-detail-metrics small, .site-detail-metrics strong { display: block; }
.site-detail-metrics small { min-height: 28px; color: #8ea1ba; }
.site-detail-metrics strong { margin-top: .35rem; font-size: 1.75rem; }
.site-detail-metrics > a > span { display: block; margin-top: .35rem; color: #79b8ff; font-size: .75rem; font-weight: 700; }
.site-detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.site-detail-grid .span-2 { grid-column: span 2; }
.site-workspace-tabs {
  display: flex;
  gap: .35rem;
  margin: 0 0 1rem;
  padding: .35rem;
  overflow-x: auto;
  border: 1px solid #293e5b;
  border-radius: 13px;
  background: #111b2a;
  scrollbar-width: thin;
}
.site-workspace-tabs a {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .72rem .9rem;
  border-radius: 9px;
  color: #9fb1c8;
  font-size: .84rem;
  font-weight: 750;
  text-decoration: none;
  white-space: nowrap;
}
.site-workspace-tabs a:hover { background: #18283d; color: #fff; }
.site-workspace-tabs a.active { background: #1f5f9e; color: #fff; box-shadow: 0 6px 18px rgba(20, 105, 190, .24); }
.site-workspace-tabs a span {
  min-width: 22px;
  padding: .12rem .4rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, .1);
  text-align: center;
  font-size: .7rem;
}
.site-workspace-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.site-workspace-panel { min-height: 330px; }
.workspace-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}
.workspace-heading.standalone {
  padding: 1rem 1.15rem;
  border: 1px solid #2d4564;
  border-radius: 13px;
  background: linear-gradient(100deg, rgba(37, 135, 255, .09), rgba(20, 31, 47, .78));
}
.workspace-heading h2 { margin: 0; font-size: 1.25rem; }
.workspace-heading p:last-child { margin: .3rem 0 0; color: #94a8c0; font-size: .82rem; }
.workspace-empty {
  display: grid;
  place-items: center;
  gap: .3rem;
  min-height: 190px;
  border: 1px dashed #355170;
  border-radius: 12px;
  color: #90a5bd;
  text-align: center;
}
.workspace-empty strong { color: #e7f1fc; font-size: 1rem; }
.success-empty::before { content: "✓"; margin-right: .35rem; color: #42d38b; font-weight: 900; }
.table-actions { text-align: right; white-space: nowrap; }
.contract-planning-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  gap: .7rem;
  margin-bottom: 1rem;
}
.contract-planning-actions > a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: .8rem;
  border: 1px solid #315071;
  border-radius: 10px;
  background: #142237;
  color: #dcecff;
  text-decoration: none;
}
.contract-planning-actions > a:hover { border-color: #2587ff; background: #182b44; }
.contract-planning-actions > a > span { display: grid; gap: .15rem; }
.contract-planning-actions > a > span:last-child { color: #77b8ff; font-size: .75rem; font-weight: 800; white-space: nowrap; }
.contract-planning-actions small { color: #91a7c0; font-size: .72rem; }
.site-timeline { display: grid; gap: .55rem; }
.site-timeline > a {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
  padding: .7rem .85rem;
  border: 1px solid #2a405d;
  border-radius: 10px;
  background: #111c2c;
  color: #f4f8fd;
  text-decoration: none;
}
.site-timeline > a:hover { border-color: #4978ad; }
.site-timeline > a.late { border-left: 3px solid #f97316; }
.site-timeline time { display: flex; align-items: baseline; gap: .35rem; color: #83bfff; }
.site-timeline time strong { font-size: 1.3rem; }
.site-timeline time span { color: #8fa5bd; font-size: .72rem; text-transform: uppercase; }
.timeline-main { display: grid; gap: .15rem; }
.timeline-main small { color: #91a6be; }
.action-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: .55rem;
  border-bottom: 1px solid #283b55;
}
.action-row > a:first-child { border-bottom: 0; }
.action-row > .btn { margin-right: .4rem; }
.contract-editor { display: grid; gap: 1rem; max-width: 1050px; margin: 0 auto; }
.contract-editor label { display: block; margin-bottom: .35rem; color: #c4d3e4; font-size: .8rem; font-weight: 750; }
.contract-checkbox {
  display: flex !important;
  align-items: flex-start;
  gap: .7rem;
  padding: .8rem;
  border: 1px solid #304864;
  border-radius: 10px;
  background: #111d2c;
}
.contract-checkbox input { margin-top: .18rem; }
.contract-checkbox span { display: grid; gap: .1rem; }
.contract-checkbox small { color: #8fa4bd; font-weight: 400; }
.required-mark { color: #ff7f8a; }
.action-editor { margin: 0 auto; }
.advanced-fields {
  padding: .8rem;
  border: 1px solid #304864;
  border-radius: 10px;
  background: #111d2c;
}
.advanced-fields summary { cursor: pointer; color: #b8cce2; font-size: .82rem; font-weight: 750; }
.advanced-fields summary span { margin-left: .35rem; color: #7990aa; font-size: .7rem; font-weight: 500; }
.advanced-fields[open] summary { margin-bottom: .85rem; }
.detail-list { margin: 0; }
.detail-list div { display: grid; grid-template-columns: 120px 1fr; gap: 1rem; padding: .55rem 0; border-bottom: 1px solid #263a56; }
.detail-list dt { color: #879ab2; font-size: .8rem; }
.detail-list dd { margin: 0; }
.responsive-table { overflow-x: auto; }

.professional-form { max-width: 980px; padding: 1.4rem; border-radius: 14px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.field-wide { grid-column: span 2; }
.professional-form label { display: block; margin-bottom: .35rem; color: #a9b8ca; font-size: .82rem; font-weight: 700; }
.form-actions { display: flex; gap: .6rem; margin-top: 1.3rem; padding-top: 1rem; border-top: 1px solid #30445f; }
}

.page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.page-heading h1 {
  margin: 0;
  font-size: 1.9rem;
  font-weight: 700;
}

.metric {
  min-height: 112px;
  padding: 1rem;
  border: 1px solid #4b5563;
  border-radius: 8px;
  background: #1f2427;
}

.metric span {
  display: block;
  min-height: 40px;
  color: #94a3b8;
  font-size: .9rem;
}

.metric strong {
  display: block;
  font-size: 2.1rem;
  line-height: 1;
}

.metric.danger {
  border-left: 5px solid #f97316;
}

.metric.warning {
  border-left: 5px solid #ffbf00;
}

section h2 {
  font-size: 1.2rem;
  margin-bottom: .85rem;
}

.form-panel {
  max-width: 1100px;
  padding: 1rem;
  border: 1px solid #4b5563;
  border-radius: 8px;
  background: #1f2427;
}

.info-panel {
  min-height: 100%;
  padding: 1rem;
  border: 1px solid #4b5563;
  border-radius: 8px;
  background: #1f2427;
}

.info-panel h2,
.info-panel h3 {
  margin-bottom: .85rem;
  font-size: 1.05rem;
  font-weight: 700;
}

.panel-subtitle {
  margin-bottom: .75rem;
  color: #94a3b8;
  font-size: .9rem;
}

.info-panel dd,
.info-panel p:last-child {
  margin-bottom: 0;
}

.summary-kicker {
  margin-bottom: .45rem;
  color: #94a3b8;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .06rem;
  text-transform: uppercase;
}

.contract-summary-card h2 {
  margin-bottom: .65rem;
  font-size: 1.15rem;
}

.equipment-list {
  display: grid;
  gap: .65rem;
}

.equipment-item {
  overflow: hidden;
  border: 1px solid #374151;
  border-radius: 7px;
  background: #111827;
}

.equipment-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .8rem 1rem;
  cursor: pointer;
  list-style: none;
}

.equipment-item summary::-webkit-details-marker {
  display: none;
}

.equipment-item summary::before {
  content: "▶";
  color: #60a5fa;
  font-size: .75rem;
  transition: transform .15s ease;
}

.equipment-item[open] summary::before {
  transform: rotate(90deg);
}

.equipment-item summary > span:first-of-type {
  flex: 1;
}

.operation-count {
  padding: .2rem .55rem;
  border-radius: 999px;
  background: #1d4ed8;
  color: #eff6ff;
  font-size: .78rem;
  white-space: nowrap;
}

.operation-list {
  margin: 0;
  padding: .8rem 1.25rem 1rem 3rem;
  border-top: 1px solid #374151;
  background: #182033;
}

.operation-list li + li {
  margin-top: .45rem;
}

.contract-edit-form {
  max-width: none;
}

.table {
  --bs-table-bg: #1f2427;
  --bs-table-color: #f8fafc;
  --bs-table-border-color: #374151;
  --bs-table-striped-bg: #182033;
  --bs-table-hover-bg: #22314a;
  color: #f8fafc;
}

.list-group {
  --bs-list-group-bg: #1f2427;
  --bs-list-group-color: #f8fafc;
  --bs-list-group-border-color: #374151;
  --bs-list-group-action-hover-bg: #22314a;
  --bs-list-group-action-hover-color: #fff;
}

.text-muted {
  color: #94a3b8 !important;
}

.btn-primary {
  --bs-btn-bg: #1478ff;
  --bs-btn-border-color: #1478ff;
  --bs-btn-hover-bg: #0b66dd;
  --bs-btn-hover-border-color: #0b66dd;
}

.btn-outline-secondary {
  --bs-btn-color: #f8fafc;
  --bs-btn-border-color: #cbd5e1;
  --bs-btn-hover-bg: #334155;
  --bs-btn-hover-border-color: #cbd5e1;
}

.form-control,
.form-select {
  background-color: #111a2c;
  border-color: #465a7a;
  color: #f8fafc;
}

.form-select {
  --bs-form-select-bg-img: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23c7d7eb' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
}

.form-control::placeholder,
textarea::placeholder,
input::placeholder {
  color: #91a4bd;
  opacity: 1;
}

.form-control:disabled,
.form-select:disabled,
.form-control[readonly] {
  border-color: #344861;
  background-color: #1a2738;
  color: #c7d3e2;
  opacity: 1;
}

.form-control[type="date"],
.form-control[type="datetime-local"],
.form-control[type="month"],
.form-control[type="time"] {
  color-scheme: dark;
  padding-right: 2.6rem;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 18 18'%3e%3crect x='2.5' y='4' width='13' height='11.5' rx='2' fill='none' stroke='%23cbe2fb' stroke-width='1.5'/%3e%3cpath d='M2.5 7.25h13M6 2.5v3M12 2.5v3' fill='none' stroke='%23cbe2fb' stroke-width='1.5' stroke-linecap='round'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right .75rem center;
  background-size: 18px 18px;
}

input[type="date"]::-webkit-calendar-picker-indicator,
input[type="datetime-local"]::-webkit-calendar-picker-indicator,
input[type="month"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-calendar-picker-indicator {
  cursor: pointer;
  width: 20px;
  height: 20px;
  margin-right: -.2rem;
  opacity: 0;
}

select option {
  background: #111a2c;
  color: #f8fafc;
}

label,
legend,
.form-label,
.col-form-label {
  color: #c5d2e2;
}

.input-group-text {
  border-color: #465a7a;
  background: #223149;
  color: #e7eef8;
}

.dropdown-menu,
.modal-content,
.card,
.accordion-item {
  border-color: #30445f;
  background-color: #141f2e;
  color: #f8fafc;
}

.dropdown-menu { min-width: 260px; padding: .45rem; border-radius: 11px; box-shadow: 0 18px 45px rgba(0, 0, 0, .35); }
.dropdown-item { display: grid; gap: .12rem; padding: .65rem .75rem; border-radius: 7px; color: #e7eef8; }
.dropdown-item span { font-weight: 750; }
.dropdown-item small { color: #8fa3bc; font-size: .72rem; }
.dropdown-item:hover,
.dropdown-item:focus { background-color: #22334b; color: #fff; }
.dropdown-item:hover small,
.dropdown-item:focus small { color: #b8cce2; }
.dropdown-divider { border-color: #30445f; }
.modal-header,
.modal-footer,
.card-header,
.card-footer,
.accordion-button { border-color: #30445f; }
.accordion-button { background: #182536; color: #f8fafc; }
.accordion-button:not(.collapsed) { background: #20334b; color: #fff; }
.table a { color: #78b9ff; }
.table a:hover { color: #b5daff; }
.table > :not(caption) > * > * { color: inherit; }
.table th { color: #dce8f6; }

.page-link {
  border-color: #3a506c;
  background: #151f2e;
  color: #8fc4ff;
}
.page-link:hover,
.page-link:focus { border-color: #5280b5; background: #22334b; color: #fff; }
.page-item.disabled .page-link { border-color: #2b3a4f; background: #111a27; color: #71839a; }

.form-check-input {
  border-color: #58708f;
  background-color: #111a2c;
}

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
  -webkit-text-fill-color: #f8fafc;
  box-shadow: 0 0 0 1000px #111a2c inset;
  caret-color: #fff;
}

.site-selector {
  min-width: 190px;
}

.form-control:focus,
.form-select:focus {
  background-color: #111a2c;
  border-color: #1478ff;
  color: #fff;
}

.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-check-input:focus {
  box-shadow: 0 0 0 .1rem #0f1728, 0 0 0 .25rem #1478ff;
}

.auth-page {
  display: grid;
  grid-template-columns: minmax(320px, 520px) minmax(320px, 1fr);
  gap: 1.5rem;
  align-items: stretch;
  min-height: calc(100vh - 180px);
  max-width: 1180px;
  margin: 1.5rem auto 0;
}

.auth-panel,
.auth-aside {
  border: 1px solid #263752;
  border-radius: 8px;
  background: #151f2f;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .22);
}

.auth-panel {
  padding: 2rem;
}

.auth-brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2.25rem;
}

.auth-logo {
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 0 .85rem;
  border: 1px solid #365173;
  border-radius: 6px;
  background: #0b1220;
  color: #ffffff;
  font-weight: 800;
  letter-spacing: .08rem;
}

.auth-kicker,
.auth-aside-label {
  color: #8fb4e8;
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.auth-heading {
  margin-bottom: 1.5rem;
}

.auth-heading h1 {
  margin: 0 0 .5rem;
  font-size: 2rem;
  font-weight: 750;
}

.auth-heading p,
.auth-aside p,
.auth-highlights dd {
  color: #b7c5d8;
}

.auth-form {
  display: grid;
  gap: 1rem;
}

.auth-form .form-floating > label {
  color: #8ea0b8;
}

.auth-form .form-floating > .form-control {
  min-height: 58px;
}

.auth-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  color: #dbeafe;
}

.auth-options a {
  color: #66a8ff;
  text-decoration: none;
}

.auth-options a:hover {
  text-decoration: underline;
}

.auth-submit {
  min-height: 48px;
  font-weight: 700;
}

.auth-validation:empty {
  display: none;
}

.auth-aside {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 2rem;
  background:
    linear-gradient(135deg, rgba(20, 120, 255, .16), rgba(22, 163, 74, .08)),
    #121c2c;
}

.auth-aside h2 {
  max-width: 620px;
  margin: .5rem 0 .75rem;
  font-size: 1.85rem;
  font-weight: 750;
}

.auth-highlights {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .75rem;
  margin: 2rem 0 0;
}

.auth-highlights div {
  min-height: 120px;
  padding: 1rem;
  border: 1px solid #314766;
  border-radius: 8px;
  background: rgba(11, 18, 32, .58);
}

.auth-highlights dt {
  margin-bottom: .35rem;
  color: #ffffff;
  font-weight: 800;
}

.auth-highlights dd {
  margin: 0;
  font-size: .92rem;
}

@media (max-width: 900px) {
  .auth-page {
    grid-template-columns: 1fr;
    margin-top: .5rem;
  }

  .auth-highlights {
    grid-template-columns: 1fr;
  }
}

.admin-heading {
  margin-bottom: 1.1rem;
}

.nova-alert {
  border-color: #2f6e8b;
  background: #c9f2ff;
  color: #08405a;
}

.admin-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .9rem;
  margin-bottom: 1.25rem;
}

.admin-metric {
  min-height: 92px;
  padding: 1rem;
  border: 1px solid #30445f;
  border-radius: 8px;
  background: #162130;
}

.admin-metric span {
  display: block;
  color: #9fb4cf;
  font-size: .82rem;
  font-weight: 700;
  text-transform: uppercase;
}

.admin-metric strong {
  display: block;
  margin-top: .55rem;
  font-size: 2rem;
  line-height: 1;
}

.admin-section {
  margin-top: 1.25rem;
}

.admin-section-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: .75rem;
}

.admin-section-title h2 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 750;
}

.admin-user-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .85rem;
}

.admin-user-card,
.admin-action-card,
.admin-table-panel {
  border: 1px solid #30445f;
  border-radius: 8px;
  background: #18212a;
}

.admin-user-card {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  min-height: 96px;
  padding: 1rem;
}

.admin-user-card h3,
.admin-action-card h3,
.admin-table-panel h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 750;
}

.admin-user-card p,
.admin-action-card p {
  margin: .3rem 0 0;
  color: #98abc4;
  font-size: .9rem;
}

.admin-badge-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: .4rem;
  min-width: 120px;
}

.nova-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: .18rem .5rem;
  border-radius: 6px;
  background: #00c2e8;
  color: #06121f;
  font-size: .76rem;
  font-weight: 800;
}

.nova-badge.muted {
  background: #475569;
  color: #e2e8f0;
}

.admin-action-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.admin-action-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-height: 100%;
  padding: 1rem;
}

.admin-card-head {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
}

.admin-card-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid #355171;
  border-radius: 8px;
  background: #0d1726;
  color: #8fb4e8;
  font-weight: 800;
}

.admin-form-grid {
  display: grid;
  gap: .85rem;
}

.admin-action-card .btn {
  align-self: flex-start;
  margin-top: auto;
}

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

.admin-table-panel {
  padding: 1rem;
}

.admin-table-panel h3 {
  margin-bottom: .75rem;
}

.admin-table-panel .table {
  margin-bottom: 0;
}

.admin-table-panel td,
.admin-table-panel th {
  white-space: nowrap;
}

.quote-grid {
  display: grid;
  grid-template-columns: minmax(360px, 1.1fr) minmax(420px, .9fr);
  gap: 1rem;
  align-items: start;
}

.quote-form {
  margin: 0;
}

.quote-form h2,
.quote-detail h2 {
  margin: 0;
  font-size: 1.18rem;
  font-weight: 750;
}

.quote-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .85rem;
}

.quote-options {
  display: grid;
  gap: .55rem;
  padding: .85rem;
  border: 1px solid #30445f;
  border-radius: 8px;
  background: #111a2c;
}

.quote-options-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}

.quote-options-title h3 {
  margin: 0;
  font-size: .98rem;
  font-weight: 750;
}

.quote-options-title span {
  color: #94a3b8;
  font-size: .82rem;
}

.quote-option {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: .55rem;
  align-items: start;
  padding: .55rem;
  border: 1px solid #263752;
  border-radius: 8px;
  background: #172236;
}

.quote-option strong,
.quote-option small {
  display: block;
}

.quote-option small {
  color: #9fb4cf;
}

.quote-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .75rem;
  margin: 0 0 1rem;
}

.quote-summary div,
.quote-total-grid div {
  padding: .75rem;
  border: 1px solid #30445f;
  border-radius: 8px;
  background: #111a2c;
}

.quote-summary dt,
.quote-total-grid span {
  color: #9fb4cf;
  font-size: .78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.quote-summary dd {
  margin: .25rem 0 0;
  color: #f8fafc;
  font-weight: 700;
}

.quote-total-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .75rem;
}

.quote-total-grid strong {
  display: block;
  margin-top: .35rem;
  font-size: 1.25rem;
}

.quote-filter {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(160px, .7fr) repeat(2, minmax(150px, .6fr)) auto;
  gap: .75rem;
  align-items: end;
}

@media (max-width: 1400px) {
  .admin-user-grid,
  .admin-action-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .quote-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1200px) {
  .admin-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .admin-metrics,
  .admin-user-grid,
  .admin-action-grid,
  .quote-form-grid,
  .quote-summary,
  .quote-total-grid,
  .quote-filter {
    grid-template-columns: 1fr;
  }

  .admin-user-card {
    flex-direction: column;
  }

  .admin-badge-list {
    justify-content: flex-start;
  }
}

/* Questionnaire initial France / Monaco */
.secure-link-row { display: flex; gap: .65rem; margin-top: .8rem; }
.onboarding-admin-grid { display: grid; grid-template-columns: minmax(320px, .8fr) minmax(420px, 1.2fr); gap: 1rem; }
.onboarding-invite-form { display: grid; gap: .65rem; }
.onboarding-toggle { display: flex !important; align-items: flex-start; gap: .75rem; padding: .9rem; border: 1px solid #355b84; border-radius: 10px; background: #12243a; cursor: pointer; }
.onboarding-toggle input { margin-top: .2rem; }
.onboarding-toggle strong, .onboarding-toggle small { display: block; }
.onboarding-toggle strong { color: #f8fafc; }
.onboarding-toggle small { margin-top: .25rem; color: #9fb4cf; }
.onboarding-invite-form label, .site-identity-panel label, .add-site-panel label, .contract-details label, .validation-panel label { color: #a9b8ca; font-size: .82rem; font-weight: 700; }
.onboarding-history { display: grid; gap: .55rem; }
.onboarding-history a { display: grid; grid-template-columns: auto 1fr; gap: .25rem .65rem; padding: .7rem; border: 1px solid #30445f; border-radius: 10px; color: #f8fafc; text-decoration: none; background: #111a2c; }
.onboarding-history a:hover { border-color: #4287e6; background: #172640; }
.onboarding-history small { grid-column: 2; color: #91a4bd; }
.status-pill { display: inline-flex; align-items: center; width: fit-content; padding: .2rem .55rem; border: 1px solid #355b84; border-radius: 999px; background: #122944; color: #9fc8ff; font-size: .75rem; font-weight: 800; }
.status-pill.done { border-color: #247c58; background: #123c2c; color: #91e5ba; }
.public-questionnaire { max-width: 1320px; margin: 0 auto; }
.questionnaire-hero { display: flex; align-items: center; justify-content: space-between; gap: 2rem; padding: 1.6rem; border: 1px solid #2f4b70; border-radius: 16px; background: linear-gradient(135deg, #152640, #101a2a); }
.questionnaire-hero h1 { margin: .2rem 0 .6rem; font-size: clamp(1.8rem, 3vw, 2.6rem); }
.questionnaire-hero p { margin: 0; color: #b7c5d8; }
.questionnaire-progress { display: flex; align-items: baseline; gap: .35rem; min-width: 150px; padding: 1rem; border: 1px solid #365d8c; border-radius: 12px; background: #0d1726; }
.questionnaire-progress strong { font-size: 2rem; color: #62a7ff; }
.questionnaire-progress span { color: #a9b8ca; }
.legal-notice { margin: 1rem 0; padding: .8rem 1rem; border-left: 4px solid #eab308; border-radius: 8px; background: #332d16; color: #f6dfa0; }
.questionnaire-site-grid { display: grid; grid-template-columns: repeat(3, minmax(260px, 1fr)); gap: 1rem; }
.questionnaire-site-card { display: flex; flex-direction: column; min-height: 260px; padding: 1.1rem; border: 1px solid #304b6d; border-radius: 14px; background: #162130; }
.questionnaire-site-card h3 { margin: .25rem 0 .4rem; font-size: 1.2rem; }
.questionnaire-site-card > p:not(.eyebrow) { color: #a9b8ca; }
.questionnaire-card-actions { display: flex; flex-wrap: wrap; gap: .55rem; margin-top: auto; }
.questionnaire-card-actions form { margin: 0; }
.add-site-panel { margin: 1.25rem 0; padding: 1rem; border: 1px dashed #3d608c; border-radius: 14px; background: #121e2e; }
.add-site-panel summary { cursor: pointer; color: #8fbeff; font-weight: 800; }
.add-site-panel[open] summary { margin-bottom: 1rem; }
.questionnaire-submit { display: flex; align-items: center; justify-content: space-between; gap: 1.25rem; margin: 1.25rem 0; padding: 1rem; border: 1px solid #38699e; border-radius: 14px; background: #172943; }
.questionnaire-submit strong, .questionnaire-submit span { display: block; }
.questionnaire-submit span { margin-top: .2rem; color: #9fb4cf; }
.questionnaire-success { display: flex; gap: 1rem; margin-top: 1rem; padding: 1.4rem; border: 1px solid #2a7e59; border-radius: 14px; background: #123527; }
.questionnaire-success > span { font-size: 2rem; color: #7fe4ad; }
.questionnaire-success h2 { margin: 0 0 .35rem; }
.questionnaire-success p { margin: 0; color: #b8d9c7; }
.site-identity-panel { display: grid; grid-template-columns: 1fr 1.5fr .65fr .8fr auto; gap: .75rem; align-items: end; margin-bottom: 1.2rem; padding: 1rem; border: 1px solid #304b6d; border-radius: 14px; background: #162130; }
.auto-update-hint { display: flex; align-items: center; gap: .45rem; min-height: 38px; padding: .55rem .65rem; color: #9bb3cd; font-size: .72rem; font-weight: 750; }
.auto-update-dot { width: 8px; height: 8px; border-radius: 50%; background: #35a5ff; box-shadow: 0 0 0 4px rgba(53, 165, 255, .13); }
.maintenance-checklist { display: grid; gap: .85rem; }
.maintenance-line { padding: 1rem; border: 1px solid #30445f; border-radius: 14px; background: #162130; }
.maintenance-line-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.maintenance-line-heading h2 { margin: .15rem 0 .7rem; font-size: 1.05rem; }
.requirement-badge { padding: .28rem .6rem; border-radius: 999px; background: #28354a; color: #d4deeb; font-size: .75rem; font-weight: 800; white-space: nowrap; }
.requirement-obligatoire { background: #6e242b; color: #ffd5d8; }
.requirement-obligatoiresiequipementpresent { background: #5c4210; color: #ffe6a3; }
.requirement-recommande { background: #173c65; color: #b7d9ff; }
.response-choice { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .5rem; }
.response-choice label { display: flex; align-items: center; gap: .45rem; min-height: 44px; padding: .65rem; border: 1px solid #3a506d; border-radius: 9px; background: #111a2c; color: #dbe7f5; cursor: pointer; }
.response-choice label:has(input:checked) { border-color: #2787ff; background: #16355d; color: #fff; }
.contract-details { margin-top: .7rem; border-top: 1px solid #2c3d55; }
.contract-details summary { padding: .65rem 0 0; cursor: pointer; color: #80b4f5; font-weight: 700; }
.contract-details .form-grid { margin-top: .75rem; }
.contract-document-panel[hidden] { display: none; }
.contract-document-panel { margin-top: .75rem; padding: .75rem; border: 1px solid #315478; border-radius: 12px; background: rgba(13, 28, 45, .48); }
.contract-required-hint { margin: 0 0 .7rem; padding: .55rem .7rem; border-left: 3px solid #f5b818; border-radius: 6px; background: #302812; color: #f5d989; font-size: .78rem; }
.contract-required-hint[hidden] { display: none; }
.maintenance-line.contract-needs-document { border-color: #d69b22; box-shadow: 0 0 0 2px rgba(245, 184, 24, .12); }
.contract-upload-zone { display: grid; gap: .7rem; margin-top: .8rem; padding: .85rem; border: 1px solid #315478; border-radius: 12px; background: #111d2c; }
.contract-document-panel .contract-upload-zone { margin-top: 0; }
.contract-file-picker { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .75rem; border: 1px dashed #4b7cb1; border-radius: 10px; background: #152942; color: #dceaff; cursor: pointer; }
.contract-file-picker:hover { border-color: #68a8ef; background: #193454; }
.contract-file-picker span, .contract-file-picker strong, .contract-file-picker small { display: block; }
.contract-file-picker small { margin-top: .18rem; color: #91abc7; font-size: .72rem; }
.contract-file-picker input { max-width: 360px; color: #c8d9eb; }
.uploaded-contract { display: flex; align-items: center; gap: .7rem; }
.uploaded-contract strong, .uploaded-contract small { display: block; overflow-wrap: anywhere; }
.uploaded-contract small { margin-top: .18rem; color: #91a8c2; }
.document-mark { display: grid; place-items: center; flex: 0 0 42px; height: 50px; border: 1px solid #a9474f; border-radius: 8px; background: #421e25; color: #ffb7bd; font-size: .68rem; font-weight: 900; }
.extracted-contract-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .5rem; }
.extracted-contract-summary span { padding: .55rem; border-radius: 8px; background: #0c1725; }
.extracted-contract-summary small, .extracted-contract-summary strong { display: block; }
.extracted-contract-summary small { color: #7892ae; font-size: .67rem; }
.extracted-contract-summary strong { margin-top: .18rem; color: #eef6ff; font-size: .78rem; overflow-wrap: anywhere; }
.analysis-warning { margin: 0; padding: .55rem .65rem; border-left: 3px solid #eab308; background: #302a14; color: #f6dda0; }
.file-selection-feedback { padding: .55rem .65rem; border: 1px solid #2d7bb7; border-radius: 8px; background: #12334d; color: #bfe3ff; font-size: .76rem; font-weight: 750; overflow-wrap: anywhere; }
.file-selection-feedback[hidden] { display: none; }
.manual-entry-toggle { display: flex; align-items: center; gap: .5rem; margin-top: .65rem; }
.manual-entry-toggle:not(:has(input:checked)) + .manual-fields { display: none; }
.analysis-overlay { position: fixed; z-index: 1200; inset: 0; display: grid; place-items: center; padding: 1rem; background: rgba(4, 10, 18, .82); backdrop-filter: blur(3px); }
.analysis-overlay[hidden] { display: none; }
.analysis-dialog { width: min(440px, 100%); padding: 1.6rem; border: 1px solid #3c6da2; border-radius: 16px; background: #142338; text-align: center; box-shadow: 0 24px 80px rgba(0, 0, 0, .45); }
.analysis-dialog h2 { margin: .9rem 0 .35rem; font-size: 1.2rem; }
.analysis-dialog p { margin: 0; color: #a9bdd4; }
.analysis-spinner { display: inline-block; width: 42px; height: 42px; border: 4px solid #2c4665; border-top-color: #4b9cff; border-radius: 50%; animation: nova-spin .85s linear infinite; }
@keyframes nova-spin { to { transform: rotate(360deg); } }
.review-contract-link { display: grid; grid-template-columns: auto minmax(120px, 1fr); gap: .05rem .5rem; align-items: center; max-width: 300px; color: #d9eaff; text-decoration: none; }
.review-contract-link > span { grid-row: 1 / 3; padding: .28rem .35rem; border-radius: 5px; background: #492028; color: #ffbdc2; font-size: .63rem; font-weight: 900; }
.review-contract-link strong { overflow-wrap: anywhere; font-size: .78rem; }
.review-contract-link small { color: #8ea8c4; font-size: .66rem; }
.review-contract-link:hover strong { color: #72b2ff; text-decoration: underline; }
.source-link { display: inline-block; margin-top: .7rem; color: #7898be; font-size: .76rem; }
.empty-questionnaire { padding: 2rem; border: 1px dashed #49617e; border-radius: 14px; text-align: center; background: #151f2f; }
.review-site { margin-bottom: 1.2rem; padding: 1rem; border: 1px solid #30445f; border-radius: 14px; background: #162130; }
.validation-panel { display: grid; grid-template-columns: 1fr .8fr auto; gap: 1rem; align-items: end; max-width: none; }
.validation-panel p { margin: .25rem 0 0; color: #9fb4cf; }

@media (max-width: 1050px) {
  .onboarding-admin-grid, .questionnaire-site-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .site-identity-panel { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .response-choice { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .extracted-contract-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .secure-link-row, .questionnaire-hero, .questionnaire-submit { flex-direction: column; align-items: stretch; }
  .onboarding-admin-grid, .questionnaire-site-grid, .site-identity-panel, .response-choice, .validation-panel { grid-template-columns: 1fr; }
  .contract-file-picker { align-items: stretch; flex-direction: column; }
  .contract-file-picker input { max-width: 100%; }
  .extracted-contract-summary { grid-template-columns: 1fr; }
}

@media (max-width: 1500px) {
  .metric-grid { grid-template-columns: repeat(3, minmax(160px, 1fr)); }
  .site-card-grid { grid-template-columns: repeat(3, minmax(220px, 1fr)); }
}

@media (max-width: 1100px) {
  .dashboard-columns { grid-template-columns: 1fr; }
  .site-card-grid, .client-grid { grid-template-columns: repeat(2, minmax(220px, 1fr)); }
  .detail-summary-grid, .site-detail-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .contract-planning-actions { grid-template-columns: repeat(2, minmax(220px, 1fr)); }
  .context-switchers { align-items: stretch; flex-direction: column; margin: .75rem 0; }
}

@media (max-width: 680px) {
  .nova-main { padding: 1rem .75rem 2rem; }
  .dashboard-hero, .page-heading { align-items: flex-start; flex-direction: column; }
  .metric-grid, .site-card-grid, .client-grid, .detail-summary-grid, .site-detail-metrics, .site-detail-grid, .site-workspace-grid, .contract-planning-actions, .form-grid { grid-template-columns: 1fr; }
  .site-detail-grid .span-2, .field-wide { grid-column: span 1; }
  .workspace-heading { align-items: stretch; flex-direction: column; }
  .workspace-heading .btn { width: 100%; }
  .site-timeline > a { grid-template-columns: 76px minmax(0, 1fr); }
  .site-timeline > a > .badge { grid-column: 2; justify-self: start; }
  .action-row { grid-template-columns: 1fr; padding-bottom: .55rem; }
  .action-row > .btn { margin: 0 .4rem; justify-self: start; }
  .metric-card { min-height: 78px; }
}

/* Planning de maintenance */
.planning-hero {
  background:
    radial-gradient(circle at 88% 10%, rgba(37, 135, 255, .22), transparent 32%),
    linear-gradient(120deg, rgba(29, 78, 216, .18), rgba(15, 28, 46, .45)),
    #131e2f;
}

.section-count,
.frequency-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: .35rem .65rem;
  border: 1px solid #31547c;
  border-radius: 999px;
  background: rgba(37, 135, 255, .1);
  color: #9cc9ff;
  font-size: .76rem;
  font-weight: 800;
  white-space: nowrap;
}

.schedule-contract-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(250px, 1fr));
  gap: 1rem;
}

.schedule-contract-card {
  display: flex;
  flex-direction: column;
  min-height: 210px;
  padding: 1.15rem;
  border: 1px solid #293f5d;
  border-radius: 14px;
  background: linear-gradient(150deg, #172436, #121c2a);
  box-shadow: 0 15px 34px rgba(0, 0, 0, .12);
}

.schedule-card-head,
.schedule-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .8rem;
}

.schedule-contract-card h3 { margin: .85rem 0 .35rem; font-size: 1.08rem; }
.schedule-contract-card > p { margin: 0 0 1rem; color: #91a4bc; font-size: .84rem; }
.schedule-frequency { color: #9ecbff; font-size: .76rem; font-weight: 800; }
.schedule-progress { height: 6px; margin: auto 0 .75rem; overflow: hidden; border-radius: 999px; background: #25354b; }
.schedule-progress span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #1677ff, #4fa3ff); }
.schedule-card-footer small { color: #8296ae; }

.planning-filter { margin-bottom: 1.25rem; }
.planning-filter summary { cursor: pointer; color: #a8bad0; font-weight: 700; }
.planning-filter form { display: grid; grid-template-columns: repeat(4, minmax(150px, 1fr)) auto; gap: .75rem; align-items: end; margin-top: 1rem; }
.planning-filter label { display: grid; gap: .3rem; color: #91a5bd; font-size: .78rem; font-weight: 700; }

.planning-timeline { display: grid; gap: 1.5rem; }
.planning-month { display: grid; grid-template-columns: 135px minmax(0, 1fr); gap: 1rem; }
.planning-month-label {
  position: sticky;
  top: 84px;
  align-self: start;
  padding: .75rem;
  border-left: 3px solid #2587ff;
  color: #b8d8ff;
  font-size: .9rem;
  font-weight: 850;
  text-transform: capitalize;
}

.visit-card-list { display: grid; gap: .75rem; }
.visit-card {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 1rem;
  padding: 1rem;
  border: 1px solid #2a405f;
  border-radius: 13px;
  background: #151f2e;
}

.visit-date {
  display: grid;
  place-items: center;
  align-content: center;
  min-height: 58px;
  border-radius: 11px;
  background: #20334d;
  color: #a8d1ff;
}
.visit-date strong { font-size: 1.35rem; line-height: 1; }
.visit-date span { margin-top: .2rem; font-size: .7rem; font-weight: 800; text-transform: uppercase; }
.visit-title-row { display: flex; align-items: start; justify-content: space-between; gap: .8rem; }
.visit-title-row h3 { margin: 0; font-size: 1rem; }
.visit-provider { margin: .35rem 0 0; color: #8fa3bb; font-size: .82rem; }
.visit-comment { margin: .75rem 0 0; padding: .65rem .75rem; border-left: 2px solid #44678e; background: #111b29; color: #a8b8ca; font-size: .8rem; white-space: pre-line; }
.visit-actions { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: .8rem; }
.visit-actions form { display: inline-flex; margin: 0; }

.planning-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-width: 780px;
  margin: 0 auto 1.4rem;
}
.planning-steps div { position: relative; display: flex; align-items: center; gap: .55rem; color: #93a6bd; }
.planning-steps div:not(:last-child)::after { content: ""; position: absolute; z-index: 0; right: 8px; left: 42px; height: 1px; background: #2b405d; }
.planning-steps span { z-index: 1; display: inline-grid; place-items: center; width: 30px; height: 30px; border: 1px solid #37506f; border-radius: 999px; background: #121d2c; }
.planning-steps .active { color: #e8f2ff; }
.planning-steps .active span { border-color: #2587ff; background: #1671df; color: #fff; }

.schedule-builder { display: grid; gap: 1rem; max-width: 1120px; margin: 0 auto; }
.schedule-contract-picker label,
.schedule-builder .form-field label,
.date-picker-card > label { display: block; margin-bottom: .35rem; color: #adbed2; font-size: .8rem; font-weight: 750; }
.selected-contract-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 1.25rem;
  border: 1px solid #315178;
  border-radius: 13px;
  background: linear-gradient(100deg, rgba(37, 135, 255, .16), rgba(21, 31, 46, .8));
}
.selected-contract-banner h2 { margin: 0; font-size: 1.2rem; }
.selected-contract-banner p:last-child { margin: .35rem 0 0; color: #a9bdd5; }
.custom-visit-count { display: grid; grid-template-columns: auto 90px; align-items: center; gap: .6rem; }
.date-picker-grid { display: grid; grid-template-columns: repeat(4, minmax(180px, 1fr)); gap: .75rem; }
.date-picker-grid.many { grid-template-columns: repeat(4, minmax(180px, 1fr)); }
.date-picker-card {
  display: grid;
  gap: .45rem;
  padding: .8rem;
  border: 1px solid #2e4665;
  border-radius: 11px;
  background: #101a28;
  color: #9db4ce;
  font-size: .78rem;
  font-weight: 800;
}
.date-picker-card:focus-within { border-color: #2587ff; box-shadow: 0 0 0 3px rgba(37, 135, 255, .12); }
.date-picker-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px;
  width: 100%;
  min-width: 0;
}
.date-picker-control .form-control {
  min-width: 0;
  width: 100%;
  padding-right: .75rem;
  border-radius: 8px 0 0 8px;
  background-image: none;
}
.date-picker-control .form-control::-webkit-calendar-picker-indicator { display: none; }
.date-picker-trigger {
  display: grid;
  place-items: center;
  width: 42px;
  min-width: 42px;
  border: 1px solid #465f80;
  border-left: 0;
  border-radius: 0 8px 8px 0;
  background: #1c2e45;
  color: #d7eaff;
  cursor: pointer;
}
.date-picker-trigger:hover { background: #244467; color: #fff; }
.date-picker-trigger:focus-visible { position: relative; z-index: 1; outline: 3px solid rgba(37, 135, 255, .35); outline-offset: 1px; }
.date-picker-trigger svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.schedule-submit-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.15rem;
  border: 1px solid #315178;
  border-radius: 13px;
  background: #162337;
}
.schedule-submit-bar p,
.schedule-submit-bar div { margin: 0; color: #a9bdd4; font-size: .82rem; }
.schedule-submit-bar strong,
.schedule-submit-bar span { display: block; color: #eef6ff; }
.schedule-submit-bar span { margin-top: .2rem; color: #a8bad0; font-weight: 400; }
.schedule-edit-form { max-width: 760px; margin-top: 1rem; }
.schedule-edit-form .date-picker-card { max-width: 300px; margin-bottom: 1rem; }
.optional { color: #a0b2c7; font-weight: 400; }

.nova-dialog {
  width: min(560px, calc(100vw - 2rem));
  padding: 0;
  border: 1px solid #53647a;
  border-radius: 16px;
  background: #111c2c;
  color: #f5f8fc;
  box-shadow: 0 28px 80px rgba(0, 0, 0, .55);
}
.nova-dialog::backdrop { background: rgba(3, 9, 18, .76); backdrop-filter: blur(3px); }
.danger-confirmation { display: grid; grid-template-columns: 46px 1fr; gap: 1rem; padding: 1.4rem; }
.danger-confirmation-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid #ef6672;
  border-radius: 999px;
  background: rgba(220, 53, 69, .13);
  color: #ff8791;
  font-size: 1.35rem;
  font-weight: 900;
}
.danger-confirmation h2 { margin: .1rem 0 .45rem; }
.danger-confirmation p { margin: 0; color: #b8c7d9; line-height: 1.55; }
.danger-confirmation > label,
.danger-confirmation > input,
.danger-confirmation > .dialog-actions { grid-column: 1 / -1; }
.danger-confirmation > label { margin-top: .35rem; color: #dbe7f5; }
.danger-eyebrow { color: #ff7f8a !important; }
.dialog-actions { display: flex; justify-content: flex-end; gap: .65rem; margin-top: .35rem; }

@media (max-width: 1100px) {
  .schedule-contract-grid { grid-template-columns: repeat(2, minmax(240px, 1fr)); }
  .date-picker-grid,
  .date-picker-grid.many { grid-template-columns: repeat(3, minmax(140px, 1fr)); }
}

@media (max-width: 760px) {
  .schedule-contract-grid,
  .planning-filter form,
  .date-picker-grid,
  .date-picker-grid.many { grid-template-columns: 1fr; }
  .planning-month { grid-template-columns: 1fr; }
  .planning-month-label { position: static; }
  .planning-steps strong { display: none; }
  .selected-contract-banner,
  .schedule-submit-bar,
  .visit-title-row { align-items: flex-start; flex-direction: column; }
  .schedule-submit-bar .btn { width: 100%; }
}

/* Réception documentaire par e-mail */
.email-hero {
  background:
    radial-gradient(circle at 86% 20%, rgba(6, 182, 212, .2), transparent 30%),
    linear-gradient(120deg, rgba(37, 99, 235, .16), rgba(14, 28, 45, .5)),
    #131e2f;
}

.email-service-status {
  display: flex;
  align-items: center;
  gap: .75rem;
  min-width: 225px;
  padding: .8rem 1rem;
  border: 1px solid #3d536f;
  border-radius: 12px;
  background: rgba(9, 18, 31, .55);
}
.email-service-status.is-ready { border-color: rgba(34, 197, 94, .5); }
.email-service-status strong,
.email-service-status small { display: block; }
.email-service-status small { margin-top: .15rem; color: #9fb2c9; }

.email-metric-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(150px, 1fr));
  gap: .8rem;
  margin-bottom: 1.2rem;
}
.email-metric {
  display: grid;
  min-height: 112px;
  padding: 1rem;
  border: 1px solid #2d425f;
  border-radius: 12px;
  background: #151f2e;
  color: #dbeafe;
  text-decoration: none;
  transition: transform .16s ease, border-color .16s ease;
}
.email-metric:hover { transform: translateY(-2px); border-color: #4b77a8; color: #fff; }
.email-metric.is-warning { border-top: 3px solid #f5b818; }
.email-metric.is-success { border-top: 3px solid #22c55e; }
.email-metric.is-danger { border-top: 3px solid #f97316; }
.email-metric span { color: #99acc4; font-size: .76rem; font-weight: 750; }
.email-metric strong { margin: .3rem 0; font-size: 1.8rem; }
.email-metric small { color: #7f94ad; font-size: .7rem; }

.email-dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, .85fr);
  gap: 1rem;
}
.email-drop-panel > p { margin: -.2rem 0 .9rem; color: #9eb0c7; }
.email-upload-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .65rem; }
.email-drop-panel > small { display: block; margin-top: .6rem; color: #879bb3; }
.readiness-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .55rem 0; border-bottom: 1px solid #283b55; color: #aab9ca; }
.readiness-row:last-child { border-bottom: 0; }
.readiness-row strong { font-size: .78rem; }
.readiness-row .ready { color: #55dc87; }
.readiness-row .waiting { color: #facc15; }
.readiness-row .manual { color: #7ec2ff; }
.email-state-filter .form-select { min-width: 210px; }

.email-queue-list { display: grid; gap: .8rem; }
.email-queue-card {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 1rem;
  padding: 1rem;
  border: 1px solid #293f5d;
  border-radius: 13px;
  background: linear-gradient(145deg, #151f2e, #121c2a);
}
.email-file-mark {
  display: grid;
  place-items: center;
  align-self: start;
  width: 48px;
  height: 58px;
  border: 1px solid rgba(248, 113, 113, .42);
  border-radius: 9px;
  background: rgba(239, 68, 68, .1);
  color: #fda4af;
  font-size: .68rem;
  font-weight: 900;
  letter-spacing: .04rem;
}
.email-queue-title { display: flex; align-items: flex-start; justify-content: space-between; gap: .8rem; }
.email-queue-title h3 { margin: 0; font-size: 1rem; overflow-wrap: anywhere; }
.email-state {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: .27rem .55rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: .68rem;
  font-weight: 850;
  white-space: nowrap;
}
.email-state.state-success { border-color: rgba(34, 197, 94, .45); background: rgba(34, 197, 94, .12); color: #78efa2; }
.email-state.state-info { border-color: rgba(34, 211, 238, .4); background: rgba(6, 182, 212, .12); color: #67e8f9; }
.email-state.state-warning { border-color: rgba(250, 204, 21, .4); background: rgba(245, 184, 24, .12); color: #fde267; }
.email-state.state-danger { border-color: rgba(249, 115, 22, .5); background: rgba(249, 115, 22, .12); color: #fdba74; }
.email-state.state-muted { border-color: #46566b; background: #263244; color: #a7b5c7; }
.email-state.state-queued { border-color: #3a5b83; background: rgba(37, 135, 255, .1); color: #9cc9ff; }
.email-meta { display: flex; flex-wrap: wrap; gap: .35rem .9rem; margin-top: .5rem; color: #8fa3bc; font-size: .75rem; }
.email-meta span:not(:last-child)::after { content: "·"; margin-left: .9rem; color: #52657d; }
.email-subject { margin: .55rem 0 0; color: #b7c8da; font-size: .8rem; }
.email-error { margin: .65rem 0 0; padding: .6rem .7rem; border-left: 2px solid #f97316; background: rgba(124, 45, 18, .16); color: #fed7aa; font-size: .78rem; }
.email-analysis-card {
  display: grid;
  gap: .7rem;
  margin-top: .75rem;
  padding: .85rem;
  border: 1px solid #315378;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(20, 47, 78, .72), rgba(14, 27, 43, .92));
}
.email-analysis-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.email-analysis-heading strong,
.email-analysis-heading small { display: block; }
.email-analysis-heading > div > strong { color: #f4f8ff; font-size: .95rem; }
.email-analysis-heading > div > small { margin-top: .2rem; color: #9eb5ce; }
.email-confidence {
  display: grid;
  min-width: 116px;
  padding: .5rem .65rem;
  border: 1px solid rgba(34, 211, 238, .35);
  border-radius: 10px;
  background: rgba(6, 182, 212, .1);
  text-align: right;
}
.email-confidence small { color: #8fb3cd; font-size: .65rem; }
.email-confidence strong { color: #7de8f5; font-size: 1.1rem; }
.email-analysis-parties { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .55rem; }
.email-analysis-parties span { padding: .55rem .65rem; border-radius: 9px; background: rgba(7, 17, 29, .48); }
.email-analysis-parties small,
.email-analysis-parties strong { display: block; }
.email-analysis-parties small { color: #7893ae; font-size: .66rem; }
.email-analysis-parties strong { margin-top: .15rem; color: #dcecff; font-size: .78rem; }
.email-routing-scores { display: flex; flex-wrap: wrap; gap: .45rem; }
.email-routing-scores span {
  padding: .3rem .5rem;
  border: 1px solid #365576;
  border-radius: 999px;
  color: #a9bdd4;
  font-size: .68rem;
}
.email-routing-scores strong { color: #fff; }
.email-analysis-details { border-top: 1px solid rgba(75, 112, 151, .45); }
.email-analysis-details summary { cursor: pointer; padding-top: .6rem; color: #a9cfff; font-size: .74rem; font-weight: 800; }
.email-signal-list { display: grid; gap: .35rem; margin: .55rem 0 0; padding-left: 1.1rem; }
.email-signal-list li { color: #c8d8e9; font-size: .74rem; }
.email-signal-list small { display: block; color: #7790aa; }
.email-confidence-fields { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .55rem; }
.email-confidence-fields span { padding: .3rem .45rem; border-radius: 7px; color: #c4d3e3; background: #17273a; font-size: .66rem; }
.email-confidence-fields span.certain { border-left: 2px solid #22c55e; }
.email-confidence-fields span.fallback { border-left: 2px solid #f5b818; }
.email-confidence-fields strong { color: #fff; }
.email-analysis-warnings { display: grid; gap: .35rem; }
.email-analysis-warnings p {
  margin: 0;
  padding: .5rem .6rem;
  border-left: 2px solid #f5b818;
  background: rgba(120, 78, 8, .18);
  color: #f9dda0;
  font-size: .7rem;
}
.email-actions { display: flex; flex-wrap: wrap; align-items: flex-start; gap: .45rem; margin-top: .8rem; }
.email-actions > form { display: inline-flex; }
.email-actions details { width: 100%; }
.email-validation,
.email-history { margin-top: .35rem; border: 1px solid #304762; border-radius: 10px; background: #101a28; }
.email-validation summary,
.email-history summary { cursor: pointer; padding: .65rem .75rem; color: #a9cfff; font-size: .78rem; font-weight: 800; }
.email-validation-form { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .7rem; padding: .2rem .75rem .75rem; }
.email-validation-form label { display: grid; gap: .3rem; color: #aebfd2; font-size: .74rem; font-weight: 750; }
.email-validation-form .wide { grid-column: 1 / -1; }
.email-decision-buttons { display: flex; justify-content: flex-end; }
.email-reject-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .55rem; padding: .75rem; border-top: 1px solid #2a3e58; }
.email-history ol { display: grid; gap: .45rem; margin: 0; padding: .1rem .75rem .75rem 2.25rem; }
.email-history li { color: #a9bbce; font-size: .75rem; }
.email-history time { margin-right: .55rem; color: #7189a4; }
.email-history li > span { margin-right: .55rem; color: #dcecff; font-weight: 750; }
.email-history small { display: block; margin-top: .15rem; color: #859ab2; }
.nova-dark-alert { border-color: #405876; background: #182536; color: #e8f2ff; }

@media (max-width: 1100px) {
  .email-metric-grid { grid-template-columns: repeat(3, minmax(150px, 1fr)); }
  .email-dashboard-grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .email-metric-grid,
  .email-validation-form { grid-template-columns: 1fr; }
  .email-validation-form .wide { grid-column: auto; }
  .email-analysis-heading { flex-direction: column; }
  .email-confidence { width: 100%; text-align: left; }
  .email-analysis-parties { grid-template-columns: 1fr; }
  .email-upload-form,
  .email-reject-form { grid-template-columns: 1fr; }
  .email-queue-card { grid-template-columns: 1fr; }
  .email-queue-title { flex-direction: column; }
  .email-file-mark { width: 42px; height: 48px; }
}
/* Questionnaire public : volontairement isolé de la navigation privée NOVA. */
.questionnaire-public-body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: #0d1524;
}

.questionnaire-public-header {
    min-height: 64px;
    padding: 0.8rem 1.5rem;
    border-bottom: 1px solid #1d2a3e;
    background: #091426;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.questionnaire-public-brand {
    color: #fff;
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-decoration: none;
}

.questionnaire-public-security {
    color: #91a4bd;
    font-size: 0.9rem;
}

.questionnaire-public-footer {
    margin-top: auto;
    padding: 1.25rem;
    color: #91a4bd;
    text-align: center;
    font-size: 0.82rem;
}

@media (max-width: 600px) {
    .questionnaire-public-header {
        padding-inline: 1rem;
    }

    .questionnaire-public-security {
        font-size: 0.75rem;
        text-align: right;
    }
}

.contract-action-button {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: .55rem;
    min-width: 23rem;
    text-align: left;
}

.context-help {
    display: inline-grid;
    width: 1.65rem;
    height: 1.65rem;
    place-items: center;
    border: 1px solid #5596df;
    border-radius: 50%;
    color: #9dccff;
    background: #10233a;
    font-size: .82rem;
    font-weight: 900;
    cursor: help;
}

.context-help:hover,
.context-help:focus-visible {
    color: #fff;
    border-color: #86bdff;
    outline: 2px solid rgba(37, 135, 255, .35);
    outline-offset: 2px;
}

@media (max-width: 600px) {
    .contract-action-button { display: flex; min-width: 0; width: 100%; white-space: normal; }
}

/* Monaco — pilotage et rapports sécurisés par secteur. */
.sector-filter-panel,
.report-filter-row {
  display: flex;
  align-items: end;
  gap: .75rem;
  margin-bottom: 1rem;
  padding: .9rem;
  border: 1px solid #29415f;
  border-radius: 12px;
  background: #111e30;
}
.sector-filter-panel label,
.report-filter-row label { min-width: 130px; color: #a9bdd4; font-weight: 750; }
.sector-filter-panel .form-select,
.report-filter-row .form-select { max-width: 360px; }
.sector-card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 1rem; }
.sector-dashboard-card { padding: 1rem; border: 1px solid #2e4b6d; border-radius: 16px; background: linear-gradient(145deg, #14253a, #101b2b); }
.sector-dashboard-card header span { color: #73aef5; font-size: .72rem; font-weight: 850; letter-spacing: .08em; }
.sector-dashboard-card header h2 { margin: .25rem 0 1rem; font-size: 1.35rem; }
.sector-metric-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .55rem; margin-bottom: 1rem; }
.sector-metric-grid a { display: grid; gap: .2rem; padding: .75rem; border: 1px solid #263d59; border-radius: 10px; background: #0d1929; color: inherit; text-decoration: none; }
.sector-metric-grid small { color: #8ea7c2; }
.sector-metric-grid strong { color: #fff; font-size: 1.35rem; }
.sector-report-page { max-width: 1500px; margin: 0 auto; }
.sector-report-header { margin-bottom: 1rem; padding: 1.2rem; border-left: 5px solid #2384f5; background: #14253a; }
.sector-report-header span { color: #86b9f6; font-size: .75rem; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.sector-report-header h1 { margin: .25rem 0; }
.sector-report-header p { margin: 0; color: #91a8c2; }
.report-kpi-row { display: grid; grid-template-columns: repeat(5, minmax(120px, 1fr)); gap: .65rem; margin-bottom: 1rem; }
.report-kpi-row > div { display: grid; padding: .8rem; border: 1px solid #2a4361; border-radius: 10px; background: #111f31; }
.report-kpi-row small { color: #91a8c2; }
.report-kpi-row strong { color: #fff; font-size: 1.45rem; }
.report-section { margin-bottom: 1rem; padding: 1rem; border: 1px solid #2a405c; border-radius: 12px; background: #111c2b; break-inside: avoid; }
.report-section h2 { margin-bottom: .75rem; font-size: 1.08rem; }
.responsive-data-list { display: grid; gap: .5rem; }
.responsive-data-list article { display: grid; gap: .18rem; padding: .65rem .75rem; border-left: 3px solid #397cc9; border-radius: 7px; background: #15253a; }
.responsive-data-list article span { color: #a8bbd0; }
.responsive-data-list .severity-critique { border-left-color: #ef4444; }
.responsive-data-list .severity-haute { border-left-color: #f59e0b; }
.site-sector { margin: 0 0 .25rem; color: #7fb7f5; font-size: .72rem; font-weight: 800; text-transform: uppercase; }

@media (max-width: 768px) {
  html, body { max-width: 100%; overflow-x: hidden; }
  .nova-main { padding-inline: .75rem; }
  .page-heading,
  .sector-heading { align-items: stretch; flex-direction: column; }
  .page-heading .btn,
  .heading-actions,
  .heading-actions .btn { width: 100%; }
  .heading-actions { display: grid !important; grid-template-columns: 1fr; }
  .sector-filter-panel,
  .report-filter-row { align-items: stretch; flex-direction: column; }
  .sector-filter-panel .form-select,
  .report-filter-row .form-select { max-width: none; width: 100%; }
  .sector-card-grid,
  .sector-metric-grid { grid-template-columns: 1fr; }
  .report-kpi-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .professional-form,
  .form-panel,
  .info-panel { padding: .85rem; }
  .modal-dialog { margin: .5rem; max-width: calc(100% - 1rem); }
  .modal-body { max-height: calc(100vh - 150px); overflow-y: auto; }
  .table-responsive,
  .nova-responsive-table { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .btn { min-height: 44px; }
  input, select, textarea { max-width: 100%; }
}

@media (max-width: 390px) {
  .report-kpi-row { grid-template-columns: 1fr; }
  .sector-dashboard-card,
  .report-section { padding: .75rem; }
}

@media print {
  .nova-header,
  .nova-footer,
  .print-hidden { display: none !important; }
  body,
  .nova-main,
  .sector-report-page { background: #fff !important; color: #111 !important; }
  .sector-report-page { max-width: none; padding: 0; }
  .sector-report-header,
  .report-kpi-row > div,
  .report-section,
  .responsive-data-list article { border-color: #aaa; background: #fff !important; color: #111 !important; }
  .sector-report-header *,
  .report-kpi-row *,
  .report-section *,
  .responsive-data-list article * { color: #111 !important; }
}
