/* ==========================================================================
   DataLM — demos.css
   Démonstrations interactives : analyse, contrôle comptable, rapprochement
   ========================================================================== */

.demo-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 28px;
}

.demo-nav a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(151, 181, 240, 0.03);
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 500;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.demo-nav a:hover {
  color: var(--text);
  border-color: var(--line-strong);
}

.demo-nav span {
  color: var(--dim);
  font-family: var(--mono);
  font-size: 0.64rem;
}

.demo-disclaimer {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 30px;
  padding: 14px 18px;
  border: 1px solid rgba(240, 180, 106, 0.2);
  border-radius: var(--radius-sm);
  background: rgba(240, 180, 106, 0.05);
}

.demo-disclaimer svg {
  width: 15px;
  height: 15px;
  margin-top: 2px;
  flex: none;
  color: var(--warn);
}

.demo-disclaimer p {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.55;
}

.demo-disclaimer strong {
  color: var(--warn);
  font-weight: 600;
}

/* --------------------------------------------------------------------------
   Bloc démonstration
   -------------------------------------------------------------------------- */

.demo {
  padding-block: clamp(44px, 6vw, 68px);
  border-top: 1px solid var(--line);
  scroll-margin-top: calc(var(--header-h) + 24px);
}

.demo:first-of-type {
  border-top: 0;
}

.demo__head {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: start;
  margin-bottom: 24px;
}

.demo__num {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(61, 123, 255, 0.07);
  color: var(--blue-2);
  font-family: var(--mono);
  font-size: 0.72rem;
}

.demo__head h2 {
  font-size: clamp(1.6rem, 2.6vw, 2.1rem);
}

.demo__head p:not(.demo__badge) {
  max-width: 58ch;
  margin-top: 7px;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.6;
}

.demo__badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: rgba(151, 181, 240, 0.03);
  color: var(--dim);
  font-size: 0.68rem;
  font-weight: 500;
  white-space: nowrap;
}

.demo__badge::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--warn);
}

/* --------------------------------------------------------------------------
   Fenêtre applicative
   -------------------------------------------------------------------------- */

.demo-app {
  overflow: hidden;
  border: 1px solid rgba(151, 181, 240, 0.18);
  border-radius: 15px;
  background: #071226;
  box-shadow: 0 40px 100px -60px rgba(0, 0, 0, 0.9);
}

.demo-app__bar {
  display: flex;
  align-items: center;
  gap: 9px;
  height: 44px;
  padding: 0 16px;
  border-bottom: 1px solid rgba(151, 181, 240, 0.12);
  background: rgba(13, 28, 53, 0.7);
  color: var(--dim);
  font-size: 0.72rem;
}

.demo-app__dots {
  display: flex;
  gap: 4px;
}

.demo-app__dots i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #26395c;
}

.demo-app__dots i:first-child {
  background: #3a5b90;
}

.demo-app__bar > span:nth-child(2) {
  color: var(--text-2);
  font-weight: 600;
}

.demo-app__status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  color: var(--ok);
  font-weight: 600;
}

.demo-app__status::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 3px rgba(75, 214, 164, 0.1);
}

.demo-app__body {
  padding: clamp(14px, 2.2vw, 24px);
}

/* --------------------------------------------------------------------------
   Barre d'outils
   -------------------------------------------------------------------------- */

.demo-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px;
  padding-bottom: 16px;
  margin-bottom: 16px;
  border-bottom: 1px solid rgba(151, 181, 240, 0.1);
}

.demo-field {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.demo-field > label {
  color: var(--dim);
  font-size: 0.67rem;
  font-weight: 500;
}

.demo-field--search {
  flex: 1 1 210px;
}

.demo-input,
.demo-select {
  height: 38px;
  width: 100%;
  min-width: 0;
  padding: 0 11px;
  border: 1px solid rgba(151, 181, 240, 0.16);
  border-radius: 7px;
  background: rgba(5, 13, 27, 0.6);
  color: var(--text-2);
  font-size: 0.79rem;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.demo-input::placeholder {
  color: #7a8faf;
}

.demo-input:hover,
.demo-select:hover {
  border-color: rgba(151, 181, 240, 0.3);
}

.demo-input:focus,
.demo-select:focus {
  outline: none;
  border-color: var(--blue);
  background: rgba(5, 13, 27, 0.85);
  box-shadow: 0 0 0 3px rgba(61, 123, 255, 0.14);
}

.demo-select {
  appearance: none;
  padding-right: 30px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2393a2bc' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  cursor: pointer;
}

.demo-select option {
  background: #0a1730;
  color: var(--text-2);
}

.demo-search {
  position: relative;
}

.demo-search svg {
  position: absolute;
  left: 11px;
  top: 50%;
  width: 14px;
  height: 14px;
  transform: translateY(-50%);
  color: var(--dim);
  pointer-events: none;
}

.demo-search .demo-input {
  padding-left: 32px;
}

.demo-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 38px;
  padding: 0 13px;
  border: 1px solid rgba(151, 181, 240, 0.18);
  border-radius: 7px;
  background: rgba(151, 181, 240, 0.04);
  color: var(--text-2);
  font-size: 0.76rem;
  font-weight: 600;
  white-space: nowrap;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.demo-btn svg {
  width: 14px;
  height: 14px;
}

.demo-btn:hover {
  border-color: rgba(151, 181, 240, 0.34);
  background: rgba(151, 181, 240, 0.08);
  color: var(--text);
}

.demo-btn--primary {
  border-color: rgba(130, 170, 255, 0.36);
  background: rgba(61, 123, 255, 0.16);
  color: #cfe0ff;
}

.demo-btn--primary:hover {
  background: rgba(61, 123, 255, 0.24);
  border-color: rgba(130, 170, 255, 0.5);
}

.demo-btn--ghost {
  border-color: transparent;
  background: transparent;
  color: var(--dim);
}

.demo-btn--ghost:hover {
  background: rgba(151, 181, 240, 0.05);
  border-color: var(--line);
}

.demo-toolbar__spacer {
  flex: 1;
}

.demo-toolbar__end {
  display: flex;
  gap: 8px;
  align-items: flex-end;
  margin-left: auto;
}

/* --------------------------------------------------------------------------
   Indicateurs
   -------------------------------------------------------------------------- */

.kpi-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
  margin-bottom: 12px;
}

.kpi-card {
  position: relative;
  padding: 13px 15px;
  overflow: hidden;
  border: 1px solid rgba(151, 181, 240, 0.12);
  border-radius: 9px;
  background: linear-gradient(160deg, rgba(151, 181, 240, 0.045), rgba(151, 181, 240, 0.012));
}

.kpi-card::after {
  content: "";
  position: absolute;
  top: 0;
  left: 14px;
  right: 14px;
  height: 1px;
  background: linear-gradient(90deg, rgba(120, 169, 255, 0.4), transparent);
}

.kpi-card span {
  display: block;
  color: var(--dim);
  font-size: 0.68rem;
  line-height: 1.3;
}

.kpi-card strong {
  display: block;
  margin-top: 3px;
  color: var(--text);
  font-size: clamp(1.1rem, 1.8vw, 1.34rem);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}

.kpi-card small {
  display: block;
  margin-top: 2px;
  color: var(--dim);
  font-size: 0.65rem;
  line-height: 1.35;
}

.kpi-card small.is-ok {
  color: var(--ok);
}

.kpi-card small.is-warn {
  color: var(--warn);
}

.kpi-card small.is-blue {
  color: var(--blue-2);
}

/* --------------------------------------------------------------------------
   Panneaux et graphiques
   -------------------------------------------------------------------------- */

.demo-panels {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 0.9fr);
  gap: 10px;
}

.demo-panel {
  min-width: 0;
  padding: 15px 16px;
  border: 1px solid rgba(151, 181, 240, 0.11);
  border-radius: 10px;
  background: rgba(151, 181, 240, 0.02);
}

.demo-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.demo-panel__head h3 {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.demo-panel__head span {
  color: var(--dim);
  font-size: 0.66rem;
}

.bar-chart {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 172px;
  padding: 8px 2px 0;
  border-bottom: 1px solid rgba(151, 181, 240, 0.12);
}

.bar-col {
  position: relative;
  display: flex;
  flex: 1;
  height: 100%;
  min-width: 0;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  gap: 5px;
}

.bar-col__bar {
  width: 100%;
  max-width: 34px;
  min-height: 2px;
  border-radius: 3px 3px 0 0;
  background: linear-gradient(180deg, #4f8aff, rgba(31, 80, 216, 0.45));
  transition: height 0.35s var(--ease), background-color 0.2s ease;
}

.bar-col:nth-child(3n) .bar-col__bar {
  background: linear-gradient(180deg, #82b3ff, rgba(61, 123, 255, 0.5));
}

.bar-col:hover .bar-col__bar {
  background: linear-gradient(180deg, #a9caff, #4f8aff);
}

.bar-col__label {
  position: absolute;
  bottom: -20px;
  color: #7a8faf;
  font-family: var(--mono);
  font-size: 0.56rem;
  white-space: nowrap;
}

.bar-col__value {
  position: absolute;
  top: -2px;
  z-index: 2;
  padding: 2px 5px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #0b1a34;
  color: var(--text-2);
  font-family: var(--mono);
  font-size: 0.58rem;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(3px);
  transition: opacity 0.15s ease, transform 0.15s ease;
  pointer-events: none;
}

.bar-col:hover .bar-col__value,
.bar-col:focus-within .bar-col__value {
  opacity: 1;
  transform: translateY(0);
}

.bar-chart {
  margin-bottom: 22px;
}

.chart-foot {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #7a8faf;
  font-size: 0.64rem;
}

.breakdown {
  display: grid;
  gap: 11px;
}

.breakdown__item {
  display: grid;
  gap: 5px;
}

.breakdown__top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 0.7rem;
}

.breakdown__top b {
  color: var(--text-2);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.breakdown__bar {
  height: 5px;
  border-radius: 5px;
  background: #152745;
  overflow: hidden;
}

.breakdown__bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2b63ee, #82b3ff);
  transition: width 0.4s var(--ease);
}

.breakdown__bar i:nth-child(1) {
  background: linear-gradient(90deg, #2b63ee, #82b3ff);
}

/* --------------------------------------------------------------------------
   Tableaux de données
   -------------------------------------------------------------------------- */

.demo-table-wrap {
  margin-top: 14px;
  overflow-x: auto;
  border: 1px solid rgba(151, 181, 240, 0.11);
  border-radius: 10px;
  background: rgba(5, 13, 27, 0.28);
}

.demo-table-wrap:focus-visible {
  outline: 2px solid var(--blue-2);
  outline-offset: 2px;
}

.demo-table {
  width: 100%;
  min-width: 700px;
  font-size: 0.74rem;
  font-variant-numeric: tabular-nums;
}

.demo-table caption {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.demo-table th,
.demo-table td {
  padding: 8px 11px;
  text-align: left;
  white-space: nowrap;
  border-bottom: 1px solid rgba(151, 181, 240, 0.06);
}

.demo-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #0a1830;
  color: var(--dim);
  font-size: 0.64rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  border-bottom-color: rgba(151, 181, 240, 0.12);
}

.demo-table tbody tr {
  transition: background-color 0.15s ease;
}

.demo-table tbody tr:hover {
  background: rgba(61, 123, 255, 0.045);
}

.demo-table tbody tr:last-child td {
  border-bottom: 0;
}

.demo-table td {
  color: var(--muted);
}

.demo-table td strong {
  color: var(--text-2);
  font-weight: 600;
}

.demo-table .num {
  text-align: right;
  font-family: var(--mono);
  font-size: 0.94em;
  color: var(--text-2);
}

.demo-table .center {
  text-align: center;
}

.demo-table--compact {
  min-width: 620px;
}

.demo-table--recon {
  min-width: 920px;
}

.demo-table--recon th:nth-child(2),
.demo-table--recon th:nth-child(3),
.demo-table--recon th:nth-child(4),
.demo-table--recon th:nth-child(5),
.demo-table--recon th:nth-child(6) {
  text-align: right;
}

.demo-table--recon td:nth-child(2),
.demo-table--recon td:nth-child(3),
.demo-table--recon td:nth-child(4) {
  text-align: right;
}

.demo-table--recon td:nth-child(5),
.demo-table--recon td:nth-child(6) {
  text-align: right;
}

.sort-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
}

.sort-btn:hover {
  color: var(--text-2);
}

.sort-btn svg {
  width: 9px;
  height: 9px;
  opacity: 0.55;
}

.sort-btn[aria-sort="ascending"] svg,
.sort-btn[aria-sort="descending"] svg,
.sort-btn.is-active svg {
  opacity: 1;
  color: var(--blue-2);
}

.sort-btn.is-asc svg {
  transform: rotate(180deg);
}

.mono-cell {
  font-family: var(--mono);
  font-size: 0.94em;
  color: var(--muted);
}

.cell-label {
  max-width: 230px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.table-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 0.64rem;
  font-weight: 600;
  line-height: 1.5;
  white-space: nowrap;
}

.table-status--ok {
  background: rgba(75, 214, 164, 0.1);
  color: var(--ok);
}

.table-status--warn {
  background: rgba(240, 180, 106, 0.11);
  color: var(--warn);
}

.table-status--danger {
  background: rgba(255, 133, 133, 0.1);
  color: var(--danger);
}

.table-status--blue {
  background: rgba(61, 123, 255, 0.12);
  color: var(--blue-2);
}

.table-status--muted {
  background: rgba(151, 181, 240, 0.07);
  color: var(--dim);
}

.table-action {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--blue-2);
  font-size: 0.69rem;
  font-weight: 600;
  white-space: nowrap;
}

.table-action:hover {
  color: var(--blue-3);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.table-action svg {
  width: 11px;
  height: 11px;
}

.demo-table tr.is-anomaly {
  background: rgba(240, 180, 106, 0.035);
}

.demo-table tr.is-anomaly:hover {
  background: rgba(240, 180, 106, 0.065);
}

.demo-table tr.is-selected {
  background: rgba(61, 123, 255, 0.09);
}

/* Pagination */

.demo-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-top: 12px;
  flex-wrap: wrap;
}

.demo-pagination__info {
  color: var(--dim);
  font-size: 0.68rem;
}

.demo-pagination__nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.page-btn {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.68rem;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.page-btn:hover {
  color: var(--text);
  background: rgba(151, 181, 240, 0.06);
}

.page-btn[aria-current="page"] {
  color: #fff;
  border-color: rgba(130, 170, 255, 0.4);
  background: rgba(61, 123, 255, 0.18);
}

.page-btn[disabled] {
  opacity: 0.35;
  cursor: not-allowed;
}

.page-btn svg {
  width: 12px;
  height: 12px;
}

.demo-empty {
  padding: 38px 20px;
  text-align: center;
  color: var(--dim);
  font-size: 0.8rem;
}

.demo-empty strong {
  display: block;
  margin-bottom: 4px;
  color: var(--text-2);
  font-size: 0.9rem;
}

/* --------------------------------------------------------------------------
   Contrôle comptable
   -------------------------------------------------------------------------- */

.anomaly-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.anomaly-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 9px;
  border: 1px solid rgba(151, 181, 240, 0.12);
  border-radius: 6px;
  background: rgba(151, 181, 240, 0.03);
  color: var(--muted);
  font-family: inherit;
  font-size: 0.67rem;
  line-height: 1.4;
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

button.anomaly-chip:hover {
  border-color: rgba(151, 181, 240, 0.32);
  color: var(--text-2);
}

.anomaly-chip.is-active {
  border-color: rgba(130, 170, 255, 0.5);
  background: rgba(61, 123, 255, 0.16);
  color: #cfe0ff;
}

.anomaly-chip.is-active b {
  color: #fff;
}

.anomaly-chip b {
  color: var(--text);
  font-weight: 600;
}

.anomaly-chip.is-danger {
  border-color: rgba(255, 133, 133, 0.18);
  background: rgba(255, 133, 133, 0.06);
}

.anomaly-chip.is-warn {
  border-color: rgba(240, 180, 106, 0.18);
  background: rgba(240, 180, 106, 0.06);
}

/* --------------------------------------------------------------------------
   Rapprochement
   -------------------------------------------------------------------------- */

.recon-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 3px;
  border: 1px solid rgba(151, 181, 240, 0.12);
  border-radius: 8px;
  background: rgba(5, 13, 27, 0.4);
  margin-bottom: 12px;
}

.recon-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 5px;
  color: var(--dim);
  font-size: 0.7rem;
  font-weight: 500;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.recon-tab:hover {
  color: var(--text-2);
}

.recon-tab[aria-pressed="true"] {
  background: rgba(61, 123, 255, 0.16);
  color: #cfe0ff;
}

.recon-tab span {
  padding: 1px 5px;
  border-radius: 3px;
  background: rgba(151, 181, 240, 0.09);
  font-family: var(--mono);
  font-size: 0.6rem;
}

.recon-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 10px;
  color: var(--dim);
  font-size: 0.66rem;
}

.recon-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.recon-legend i {
  width: 7px;
  height: 7px;
  border-radius: 2px;
}

.recon-legend i.ok {
  background: var(--ok);
}

.recon-legend i.diff {
  background: var(--warn);
}

.recon-legend i.ko {
  background: var(--danger);
}

.recon-legend i.blue {
  background: var(--blue-2);
}

.recon-progress {
  height: 6px;
  margin-block: 8px 4px;
  border-radius: 4px;
  background: #152745;
  overflow: hidden;
}

.recon-progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue-deep), var(--ok));
  transition: width 0.5s var(--ease);
}

.recon-amount--diff {
  color: var(--warn) !important;
}

.recon-amount--missing {
  color: var(--danger) !important;
}

.recon-amount--ok {
  color: var(--ok) !important;
}

/* --------------------------------------------------------------------------
   Dialogues
   -------------------------------------------------------------------------- */

.demo-dialog {
  width: min(100% - 32px, 540px);
  max-height: min(86vh, 720px);
  padding: 0;
  border: 1px solid rgba(130, 170, 255, 0.25);
  border-radius: 14px;
  background: #081428;
  color: var(--text-2);
  box-shadow: 0 50px 120px -30px rgba(0, 0, 0, 0.95);
  overflow: auto;
}

.demo-dialog::backdrop {
  background: rgba(3, 8, 17, 0.78);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

.demo-dialog__bar {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 15px 18px;
  border-bottom: 1px solid var(--line);
  background: #0a1830;
}

.demo-dialog__bar h2 {
  font-size: 0.96rem;
  letter-spacing: -0.015em;
}

.dialog-close {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  transition: color 0.2s ease, border-color 0.2s ease;
}

.dialog-close:hover {
  color: var(--text);
  border-color: var(--line-strong);
}

.dialog-close svg {
  width: 14px;
  height: 14px;
}

.demo-dialog__body {
  padding: 18px;
}

.dialog-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
}

.dialog-meta > div {
  padding: 10px 12px;
  background: #081428;
}

.dialog-meta dt {
  color: var(--dim);
  font-size: 0.64rem;
}

.dialog-meta dd {
  margin-top: 2px;
  color: var(--text-2);
  font-size: 0.8rem;
  font-weight: 500;
}

.dialog-section {
  margin-top: 18px;
}

.dialog-section h3 {
  margin-bottom: 8px;
  font-size: 0.78rem;
  letter-spacing: 0;
}

.dialog-checks {
  display: grid;
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
}

.dialog-check {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 9px 11px;
  background: #081428;
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.45;
}

.dialog-check svg {
  width: 13px;
  height: 13px;
  margin-top: 1px;
  flex: none;
}

.dialog-check.is-ok svg {
  color: var(--ok);
}

.dialog-check.is-ko {
  background: rgba(240, 180, 106, 0.04);
  color: var(--text-2);
}

.dialog-check.is-ko svg {
  color: var(--warn);
}

.dialog-note {
  margin-top: 14px;
  color: var(--dim);
  font-size: 0.7rem;
  line-height: 1.55;
}

/* --------------------------------------------------------------------------
   Responsive — démos
   -------------------------------------------------------------------------- */

@media (max-width: 940px) {
  .kpi-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .bar-chart {
    height: 150px;
  }
}

@media (max-width: 720px) {
  .demo__head {
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 12px;
  }

  .demo__badge {
    grid-column: 2;
    justify-self: start;
    margin-top: -6px;
  }

  .demo-toolbar {
    align-items: stretch;
  }

  .demo-field {
    flex: 1 1 100%;
  }

  .demo-field--half {
    flex: 1 1 calc(50% - 5px);
  }

  .demo-toolbar__end {
    width: 100%;
    margin-left: 0;
  }

  .demo-toolbar__end .demo-btn {
    flex: 1;
  }

  .demo-app__body {
    padding: 12px;
  }

  .demo-table {
    min-width: 680px;
  }

  .dialog-meta {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .kpi-row {
    grid-template-columns: 1fr 1fr;
  }

  .kpi-card {
    padding: 10px 11px;
  }

  .kpi-card strong {
    font-size: 1rem;
  }

  .bar-col:nth-child(even) .bar-col__label {
    display: none;
  }

  .recon-tabs {
    gap: 2px;
  }

  .recon-tab {
    padding: 5px 7px;
    font-size: 0.64rem;
  }

  .recon-tab span {
    display: none;
  }
}

/* --------------------------------------------------------------------------
   Impression
   -------------------------------------------------------------------------- */

@media print {
  .site-header,
  .site-footer,
  .demo-toolbar,
  .demo-nav,
  .demo-app__bar {
    display: none !important;
  }

  body {
    background: #fff;
    color: #111;
  }

  .demo-app {
    border: 1px solid #bbb;
    box-shadow: none;
  }
}
