:root {
  --bg: #edf3fb;
  --surface: #ffffff;
  --surface-alt: #f5f7fb;
  --line: #d8e0ea;
  --text: #162334;
  --muted: #5c6b7c;
  --primary: #1a3fa3;
  --primary-dark: #5a8ee6;
  --primary-pale: #dceafc;
  --success: #1f9d68;
  --warning: #f0a93a;
  --danger: #d9534f;
  --dark: #0d1117;
  --shadow: 0 20px 45px rgba(36, 58, 89, 0.12);
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --container: 100%;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/inter-latin-400-normal.woff2") format("woff2");
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/inter-latin-500-normal.woff2") format("woff2");
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/inter-latin-600-normal.woff2") format("woff2");
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/inter-latin-700-normal.woff2") format("woff2");
}

* {
  box-sizing: border-box;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

body {
  margin: 0;
  color: var(--text);
  font-family: "Inter", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background:
    radial-gradient(
      circle at top left,
      rgba(88, 161, 255, 0.18),
      transparent 28%
    ),
    radial-gradient(
      circle at bottom right,
      rgba(47, 128, 237, 0.12),
      transparent 35%
    ),
    linear-gradient(180deg, #f4f8fd 0%, #e9eff7 100%);
}

a {
  color: var(--primary);
  text-decoration: none;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.16) 0%,
      rgba(255, 255, 255, 0.04) 18%,
      rgba(255, 255, 255, 0) 100%
    ),
    linear-gradient(180deg, #0d2060 0%, #1a3fa3 100%);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 12px 30px rgba(10, 58, 90, 0.18);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  min-height: 72px;
  padding: 10px 18px 12px;
}

.topbar-brand,
.topbar-nav a,
.topbar-user {
  color: #eef4ff;
}

.topbar-brand {
  font-weight: 800;
  letter-spacing: 0.02em;
  font-size: 0.92rem;
  line-height: 1.05;
  text-shadow: 0 1px 0 rgba(8, 34, 63, 0.18);
  display: flex;
  align-items: center;
}

.topbar-logo {
  height: 48px;
  width: auto;
  border-radius: 8px;
  background: #fff;
  padding: 3px 9px;
  display: block;
  box-shadow: 0 1px 3px rgba(8, 34, 63, 0.25);
}

.topbar-nav {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.25rem;
  overflow: visible;
}

.topbar-nav::-webkit-scrollbar {
  display: none;
}

.topbar-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  min-height: 38px;
  padding: 7px 14px;
  font-size: 0.82rem;
  font-weight: 700;
  border-radius: 999px;
  transition:
    background-color 0.18s ease,
    color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.18s ease;
}

.topbar-nav .topbar-link {
  color: rgba(245, 250, 255, 0.96);
}

.topbar-nav a.active,
.topbar-nav a[aria-current="page"] {
  background: rgba(255, 255, 255, 0.18);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    0 8px 18px rgba(8, 45, 76, 0.14);
  color: #fff;
}

.topbar-nav a:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  text-decoration: none;
  transform: translateY(-1px);
}

.topbar-nav a:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.72);
  outline-offset: 2px;
  text-decoration: none;
}

.topbar-dropdown {
  position: relative;
}

.topbar-dropdown summary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  color: #eef4ff;
  font-size: 0.82rem;
  font-weight: 700;
  list-style: none;
  cursor: pointer;
  white-space: nowrap;
}

.topbar-dropdown summary::-webkit-details-marker {
  display: none;
}

.topbar-dropdown[open] summary,
.topbar-dropdown summary:hover {
  background: #fff;
  color: var(--primary);
}

.topbar-submenu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 148px;
  background: #1a3fa3;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.26);
  z-index: 70;
}

.topbar-link {
  white-space: nowrap;
}

.topbar-submenu a {
  display: flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  color: #fff;
  font-size: 0.77rem;
  font-weight: 700;
}

.topbar-submenu a:hover {
  background: #0d2060;
  color: #fff;
  text-decoration: none;
}

.topbar-user {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.85rem;
  padding: 5px 10px 5px 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
  cursor: pointer;
  user-select: none;
}

.topbar-user > span {
  color: rgba(245, 250, 255, 0.92);
  font-weight: 700;
}

.topbar-user form button {
  min-height: 36px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-weight: 700;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14);
  transition:
    background-color 0.18s ease,
    transform 0.18s ease;
}

.topbar-user form button:hover {
  background: rgba(255, 255, 255, 0.28);
  transform: translateY(-1px);
}

.topbar-subnav {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  padding: 8px 16px;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.02),
    rgba(0, 0, 0, 0.02)
  );
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.topbar-subnav .nav-link {
  background: transparent;
  color: rgba(255, 255, 255, 0.9);
}

.topbar-subnav .nav-link.active {
  background: linear-gradient(180deg, var(--primary), var(--primary-dark));
  color: #fff;
  border-radius: 12px;
}

.topbar-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 6px;
  margin-left: 6px;
  border-radius: 10px;
  background: #e74c3c;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
}

.messages-page {
  padding: 18px 18px 40px;
}

.messages-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.messages-actions {
  display: flex;
  gap: 10px;
}

.messages-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border: 1px solid #c7d5e6;
}

.messages-table th,
.messages-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #e2e8f0;
  text-align: left;
  font-size: 0.85rem;
}

.messages-table th {
  background: #f4f6f9;
  font-weight: 700;
}

.message-unread {
  background: #f0f6ff;
  font-weight: 700;
}

.message-body {
  white-space: pre-wrap;
  background: #fff;
  border: 1px solid #c7d5e6;
  padding: 16px;
  border-radius: 8px;
}

.message-meta {
  font-size: 0.8rem;
  color: #5b6674;
  margin-bottom: 12px;
}

a:hover {
  text-decoration: underline;
}

.app-shell {
  min-height: 100vh;
}

.container {
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding-left: 3px;
  padding-right: 3px;
}

.modal-like .container {
  padding-left: 20px;
  padding-right: 20px;
}

.py-4 {
  padding-top: 1.75rem;
  padding-bottom: 1.75rem;
}

.mb-0 {
  margin-bottom: 0;
}
.mb-1 {
  margin-bottom: 0.35rem;
}
.mb-2 {
  margin-bottom: 0.75rem;
}
.mb-3 {
  margin-bottom: 1rem;
}
.mb-4 {
  margin-bottom: 1.5rem;
}
.mt-2 {
  margin-top: 0.75rem;
}
.mt-3 {
  margin-top: 1rem;
}

.d-flex {
  display: flex;
}
.d-grid {
  display: grid;
}
.flex-wrap {
  flex-wrap: wrap;
}
.justify-content-between {
  justify-content: space-between;
}
.justify-content-lg-end {
  justify-content: flex-end;
}
.align-items-center {
  align-items: center;
}
.gap-2 {
  gap: 0.75rem;
}
.gap-3 {
  gap: 1rem;
}
.g-3 {
  gap: 1rem;
}
.g-4 {
  gap: 1.25rem;
}
.h-100 {
  height: 100%;
}
.w-100 {
  width: 100%;
}
.text-center {
  text-align: center;
}
.text-end {
  text-align: right;
}
.text-muted {
  color: var(--muted);
}
.text-dark {
  color: var(--text);
}
.text-decoration-none {
  text-decoration: none;
}
.fw-bold {
  font-weight: 700;
}
.fw-semibold {
  font-weight: 600;
}
.small {
  font-size: 0.9rem;
}
.display-6 {
  font-size: clamp(2rem, 3vw, 2.75rem);
}
.h3 {
  font-size: clamp(2rem, 3vw, 3rem);
}
.h5 {
  font-size: 1.1rem;
}
.h6 {
  font-size: 0.95rem;
}

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

[class*="col-"] {
  grid-column: span 12;
}

.col-12 {
  grid-column: span 12;
}
.col-md-2 {
  grid-column: span 12;
}
.col-md-3 {
  grid-column: span 12;
}
.col-md-4 {
  grid-column: span 12;
}
.col-md-6 {
  grid-column: span 12;
}
.col-lg-3 {
  grid-column: span 12;
}
.col-lg-5 {
  grid-column: span 12;
}
.col-lg-6 {
  grid-column: span 12;
}
.col-lg-7 {
  grid-column: span 12;
}

@media (min-width: 768px) {
  .col-md-2 {
    grid-column: span 2;
  }
  .col-md-3 {
    grid-column: span 3;
  }
  .col-md-4 {
    grid-column: span 4;
  }
  .col-md-6 {
    grid-column: span 6;
  }
}

@media (min-width: 1024px) {
  .col-lg-3 {
    grid-column: span 3;
  }
  .col-lg-5 {
    grid-column: span 5;
  }
  .col-lg-6 {
    grid-column: span 6;
  }
  .col-lg-7 {
    grid-column: span 7;
  }
}

.card,
.panel {
  background: var(--surface);
  border: 1px solid rgba(216, 224, 234, 0.9);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.card-body,
.card-header,
.card-footer,
.card-toolbar {
  padding: 1.25rem 1.4rem;
}

.card-header,
.card-toolbar {
  border-bottom: 1px solid var(--line);
}

.card-header.bg-white {
  background: var(--surface);
}

.border {
  border: 1px solid var(--line);
}

.border-0 {
  border: 0;
}

.border-danger {
  border-color: rgba(217, 83, 79, 0.4);
}

.rounded-3 {
  border-radius: var(--radius-sm);
}
.rounded-4 {
  border-radius: var(--radius-md);
}

.bg-light {
  background: var(--surface-alt);
}
.bg-white {
  background: var(--surface);
}
.bg-body-tertiary {
  background: transparent;
}

.shadow-sm {
  box-shadow: 0 14px 30px rgba(36, 58, 89, 0.1);
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.92rem;
  color: var(--muted);
}

.form-control,
.form-select,
input,
select,
textarea {
  width: 100%;
  min-height: 46px;
  border: 1px solid #c7d2e1;
  border-radius: 12px;
  padding: 0 14px;
  background: #fff;
  color: var(--text);
  font-size: 0.96rem;
  outline: 0;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

textarea {
  min-height: 120px;
  padding: 12px 14px;
}

.form-control:focus,
.form-select:focus,
input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(26, 63, 163, 0.15);
}

input[readonly],
textarea[readonly] {
  background: #f4f8fc;
  border-color: transparent;
  color: #2c3e56;
  cursor: default;
}

input[readonly]:focus,
textarea[readonly]:focus {
  border-color: transparent;
  box-shadow: none;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border: 0;
  border-radius: 12px;
  font-weight: 700;
  cursor: pointer;
  transition:
    transform 0.18s ease,
    filter 0.18s ease,
    background 0.18s ease;
}

.ui-icon {
  width: 16px;
  height: 16px;
  display: inline-block;
  flex: 0 0 16px;
  margin-right: 0.45rem;
  vertical-align: middle;
}

.btn-sm .ui-icon {
  width: 14px;
  height: 14px;
  flex-basis: 14px;
}

.btn:hover {
  text-decoration: none;
  filter: brightness(1.03);
  transform: translateY(-1px);
}

.btn:focus-visible,
a:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.btn-primary {
  background: linear-gradient(
    135deg,
    var(--primary) 0%,
    var(--primary-dark) 100%
  );
  color: #fff;
}

.btn-success {
  background: linear-gradient(135deg, #21a36f 0%, #0c8152 100%);
  color: #fff;
}

.btn-danger {
  background: linear-gradient(135deg, #d94d45 0%, #b42318 100%);
  color: #fff;
}

.btn-danger:hover,
.btn-danger:focus {
  color: #fff;
}

.btn-outline-secondary {
  background: #fff;
  color: var(--text);
  border: 1px solid var(--line);
}

.btn-outline-secondary:hover {
  background: var(--surface-alt);
  border-color: #c2cede;
}

.btn-outline-primary {
  background: linear-gradient(
    135deg,
    var(--primary) 0%,
    var(--primary-dark) 100%
  );
  color: #fff;
  border: 0;
}

.btn-sm {
  min-height: 38px;
  padding: 0 14px;
  font-size: 0.88rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
}

.bg-success,
.text-bg-success {
  background: rgba(31, 157, 104, 0.14);
  color: #0f7f53;
}
.bg-warning,
.text-bg-warning {
  background: rgba(240, 169, 58, 0.18);
  color: #b06f00;
}
.bg-danger,
.text-bg-danger {
  background: rgba(217, 83, 79, 0.16);
  color: #b12f2a;
}
.bg-secondary,
.text-bg-secondary {
  background: rgba(47, 77, 118, 0.12);
  color: #365072;
}
.bg-primary,
.text-bg-primary {
  background: var(--primary-pale);
  color: var(--primary);
}
.text-bg-dark {
  background: rgba(13, 17, 23, 0.12);
  color: #0d1117;
}

.table-responsive {
  overflow-x: auto;
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table thead th {
  text-align: left;
  font-size: 0.9rem;
  color: var(--muted);
  font-weight: 700;
  padding: 14px 10px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.table tbody td {
  padding: 14px 10px;
  border-bottom: 1px solid rgba(216, 224, 234, 0.7);
  vertical-align: top;
}

.table tbody tr:hover {
  background: rgba(59, 110, 220, 0.10);
  transition: background 0.1s;
}

.nav-tabs {
  display: flex;
  gap: 0.55rem;
  flex-wrap: nowrap;
  overflow-x: auto;
  padding-bottom: 0.5rem;
}

.nav-item {
  list-style: none;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 14px;
  border: 0;
  border-radius: 10px;
  background: #eef2fa;
  color: #2d4470;
  font-weight: 600;
  font-size: 0.875rem;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}

.nav-link:hover:not(.active) {
  background: #dde6f7;
  color: #1a3399;
}

.nav-link.active {
  background: linear-gradient(135deg, #1e40af 0%, #2563eb 100%);
  color: #fff;
  box-shadow: 0 2px 8px rgba(30, 64, 175, 0.28);
}

.tab-content {
  margin-top: 1rem;
}

.tab-pane {
  display: none;
}

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

.page-subnav {
  position: sticky;
  top: 0;
  z-index: 7;
  display: flex;
  gap: 0.55rem;
  margin: 0 0 1rem;
  padding: 0.65rem;
  overflow-x: auto;
  border: 1px solid rgba(207, 219, 233, 0.95);
  border-radius: 18px;
  background: rgba(247, 250, 254, 0.96);
  box-shadow: 0 14px 32px rgba(29, 54, 92, 0.08);
}

.page-subnav .nav-link {
  min-height: 38px;
  border-radius: 999px;
  background: #eef4fb;
  color: #21324d;
}

.page-subnav .nav-link:hover,
.page-subnav .nav-link.active {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff;
  text-decoration: none;
}

/* ── Sous-menu vertical en sidebar (à gauche) ────────────────────────────── */
.subnav-layout {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
}

.subnav-layout .superadmin-tab-content,
.subnav-layout > .tab-content {
  flex: 1 1 auto;
  min-width: 0; /* évite le débordement des tableaux larges */
}

.page-subnav--vertical {
  flex: 0 0 236px;
  width: 236px;
  flex-direction: column;
  gap: 0.3rem;
  overflow-x: visible;
  overflow-y: auto;
  align-self: flex-start;
  max-height: calc(100vh - 1.5rem);
}

.page-subnav--vertical .nav-link {
  width: 100%;
  justify-content: flex-start;
  border-radius: 12px;
}

/* Repli mobile : la sidebar repasse en barre horizontale au-dessus du contenu */
@media (max-width: 900px) {
  .subnav-layout {
    flex-direction: column;
    gap: 0;
  }
  .page-subnav--vertical {
    flex: none;
    width: auto;
    flex-direction: row;
    overflow-x: auto;
    overflow-y: visible;
    max-height: none;
    align-self: stretch;
  }
  .page-subnav--vertical .nav-link {
    width: auto;
  }
}

.superadmin-tab-content {
  min-height: 360px;
}

.superadmin-tab-pane {
  scroll-margin-top: 110px;
}

.document-bulk-form {
  margin: 0;
}

.split-workbench {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
  gap: 1rem;
  align-items: start;
}

.split-workbench-main {
  min-width: 0;
}

.split-workbench-sidebar {
  position: sticky;
  top: 76px;
  z-index: 4;
  border-radius: 18px !important;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(20, 38, 68, 0.08);
}

.split-workbench-sidebar.excel-panel {
  margin-top: 14px;
}

.compact-filter-panel .excel-panel-body {
  padding: 14px;
}

.compact-filter-form {
  display: grid;
  gap: 0.85rem;
}

.compact-filter-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  padding-top: 0.15rem;
}

.compact-filter-actions .btn {
  flex: 1 1 126px;
}

.document-action-strip {
  display: grid;
  grid-template-columns: minmax(180px, 0.75fr) minmax(240px, 1.2fr) auto;
  gap: 0.85rem;
  align-items: end;
  padding: 0.9rem;
  border: 1px solid #d6e2ef;
  border-radius: 14px;
  background: linear-gradient(180deg, #f9fbff 0%, #eef5fd 100%);
}

.document-action-strip__comment {
  min-width: 0;
}

.catalog-edit-panel {
  position: fixed;
  top: 50%;
  right: 18px;
  z-index: 90;
  width: min(520px, calc(100vw - 32px));
  max-height: min(720px, calc(100vh - 96px));
  margin-top: 0 !important;
  padding: 1rem;
  border: 1px solid #c8d8eb;
  border-radius: 18px;
  background: linear-gradient(180deg, #f8fbff 0%, #eef5fd 100%);
  box-shadow: 0 26px 58px rgba(25, 49, 84, 0.22);
  overflow-y: auto;
  transform: translateY(-50%);
}

.catalog-edit-panel__header {
  position: sticky;
  top: -1rem;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: -1rem -1rem 0.85rem;
  padding: 1rem;
  border-bottom: 1px solid #d4e0ee;
  background: linear-gradient(180deg, #f8fbff 0%, #eef5fd 100%);
  color: var(--ink);
}

.catalog-edit-panel__header strong {
  font-size: 1rem;
}

.catalog-edit-panel .form-sheet {
  padding: 0;
  border: 0;
  background: transparent;
}

.catalog-edit-panel .grid-2 {
  grid-template-columns: 1fr;
}

/* ── Modal suppression définitive de champ ────────────────────────────────── */
.dt-confirm-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}
.dt-confirm-modal[hidden] {
  display: none;
}
.dt-confirm-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 20, 60, 0.6);
  backdrop-filter: blur(2px);
}
.dt-confirm-modal__box {
  position: relative;
  background: #fff;
  border-radius: 12px;
  padding: 28px 32px;
  max-width: 480px;
  width: 100%;
  box-shadow: 0 8px 40px rgba(10, 20, 60, 0.25);
}
.dt-confirm-modal__title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: #162334;
}
.dt-confirm-modal__warning {
  background: #fff3cd;
  border: 1px solid #ffc107;
  border-radius: 6px;
  padding: 10px 14px;
  font-size: .9rem;
  margin-bottom: 14px;
}
.dt-confirm-modal__field-name {
  font-size: .9rem;
  margin-bottom: 16px;
}
.dt-confirm-modal__confirm-label {
  font-size: .85rem;
  font-weight: 600;
  margin-bottom: 6px;
  display: block;
}
.dt-confirm-modal__actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
  justify-content: flex-end;
}

.notification-popup-shell .topbar {
  display: none;
}

.notification-popup-shell {
  background:
    radial-gradient(
      circle at top right,
      rgba(11, 111, 163, 0.18),
      transparent 32%
    ),
    linear-gradient(180deg, #f4f8fd 0%, #e7f0fa 100%);
}

.notification-popup-page {
  min-height: 100vh;
  padding: 18px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.notification-send-window {
  width: min(920px, calc(100vw - 24px));
  max-height: calc(100vh - 36px);
  border: 1px solid #c8d8eb;
  border-radius: 18px;
  background: linear-gradient(180deg, #f8fbff 0%, #eef5fd 100%);
  box-shadow: 0 26px 58px rgba(25, 49, 84, 0.24);
  overflow: auto;
}

.notification-send-window__header {
  position: sticky;
  top: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem;
  border-bottom: 1px solid #d4e0ee;
  background: linear-gradient(180deg, #f8fbff 0%, #eef5fd 100%);
}

.notification-send-window__header strong {
  display: block;
  margin-top: 0.2rem;
  color: var(--text);
  font-size: 1.08rem;
}

.notification-send-window__body {
  padding: 1rem;
}

.notification-send-intro {
  padding-bottom: 0.8rem;
}

.notification-send-intro h1 {
  margin: 0 0 0.25rem;
  color: var(--text);
  font-size: clamp(1.45rem, 2vw, 1.9rem);
  line-height: 1.05;
}

.notification-send-panel {
  border: 1px solid #d7e2ef;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.88);
}

.notification-send-panel__body {
  padding: 1rem;
}

.notification-send-panel .form-sheet {
  padding: 0;
  border: 0;
  background: transparent;
}

.notification-send-panel #id_dossier {
  display: none;
}

.notification-selected-dossiers {
  display: grid;
  gap: 0.65rem;
  padding: 0.85rem;
  border: 1px solid #c9dbef;
  border-radius: 16px;
  background: #f6faff;
}

.notification-selected-dossiers__title {
  color: var(--text);
  font-weight: 800;
}

.notification-selected-dossiers__list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 0.55rem;
}

.notification-selected-dossier {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.15rem 0.55rem;
  align-items: center;
  min-height: 52px;
  padding: 0.6rem 0.7rem;
  border: 1px solid #c6d6ea;
  border-radius: 14px;
  background: #ffffff;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.notification-selected-dossier span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 800;
}

.notification-selected-dossier strong {
  font-weight: 800;
}

.notification-selected-dossier small {
  grid-column: 2;
  color: var(--muted);
  font-weight: 700;
}

.notification-selected-dossier:hover,
.notification-selected-dossier:focus {
  border-color: var(--primary);
  box-shadow: 0 10px 20px rgba(26, 63, 163, 0.14);
  outline: none;
}

.notification-send-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 1rem;
}

@media (max-width: 760px) {
  .notification-popup-page {
    padding: 10px;
  }

  .notification-send-window {
    width: 100%;
    max-height: calc(100vh - 20px);
  }

  .notification-send-panel .grid-2 {
    grid-template-columns: 1fr;
  }
}

.overflow-auto {
  overflow: auto;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}

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

.account-creation-stage {
  display: grid;
  gap: 1rem;
}

.account-creation-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.9fr);
  gap: 1rem;
  align-items: start;
  padding: 1.35rem 1.45rem;
  border: 1px solid rgba(199, 214, 233, 0.95);
  border-radius: 24px;
  background:
    radial-gradient(
      circle at top right,
      rgba(123, 178, 230, 0.24),
      transparent 34%
    ),
    linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.98) 0%,
      rgba(241, 247, 255, 0.96) 100%
    );
  box-shadow: 0 18px 34px rgba(32, 58, 95, 0.08);
}

.account-creation-hero h2 {
  margin: 0.2rem 0 0.45rem;
  font-size: clamp(1.4rem, 2vw, 1.9rem);
  color: #183766;
}

.account-creation-hero p {
  margin: 0;
  max-width: 780px;
  color: #42556d;
  line-height: 1.5;
}

.account-creation-grid {
  align-items: stretch;
}

.role-card-badge-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  justify-content: flex-end;
  align-content: flex-start;
}

.role-card-badge {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 0.95rem;
  border-radius: 999px;
  border: 1px solid rgba(181, 198, 220, 0.95);
  background: rgba(255, 255, 255, 0.92);
  color: #1d355d;
  font-size: 0.82rem;
  font-weight: 700;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.role-card-badge--partner {
  color: #126445;
  border-color: rgba(18, 100, 69, 0.18);
  background: rgba(31, 157, 104, 0.12);
}

.role-card-badge--admin {
  color: #163c87;
  border-color: rgba(22, 60, 135, 0.18);
  background: rgba(62, 113, 216, 0.12);
}

.role-card-badge--agent {
  color: #8a5800;
  border-color: rgba(169, 112, 16, 0.22);
  background: rgba(240, 169, 58, 0.17);
}

.role-creation-card {
  --role-accent: #7bb2e6;
  --role-surface: rgba(123, 178, 230, 0.08);
  --role-border: rgba(123, 178, 230, 0.2);
  position: relative;
  overflow: hidden;
  border: 1px solid var(--role-border);
  background:
    radial-gradient(
      circle at top right,
      rgba(255, 255, 255, 0.88),
      transparent 34%
    ),
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.98) 0%,
      var(--role-surface) 100%
    );
  box-shadow: 0 22px 38px rgba(24, 46, 80, 0.08);
}

.role-creation-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 7px;
  background: linear-gradient(
    90deg,
    var(--role-accent) 0%,
    rgba(255, 255, 255, 0.92) 100%
  );
}

.role-creation-card--partner {
  --role-accent: #1f9d68;
  --role-surface: rgba(31, 157, 104, 0.1);
  --role-border: rgba(31, 157, 104, 0.22);
}

.role-creation-card--admin {
  --role-accent: #2f61d2;
  --role-surface: rgba(62, 113, 216, 0.1);
  --role-border: rgba(62, 113, 216, 0.22);
}

.role-creation-card--agent {
  --role-accent: #f0a93a;
  --role-surface: rgba(240, 169, 58, 0.12);
  --role-border: rgba(240, 169, 58, 0.26);
}

.role-creation-card .excel-panel-header {
  display: grid;
  gap: 0.55rem;
  border-bottom: 0;
  padding-bottom: 0.9rem;
}

.role-creation-card .excel-panel-body {
  padding-top: 0;
}

.role-creation-card__kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 30px;
  padding: 0 0.8rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--role-border);
  color: var(--role-accent);
  font-size: 0.77rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.role-creation-card__lede {
  margin: 0;
  min-height: 3.2em;
  color: #44566d;
  line-height: 1.45;
}

.role-creation-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.role-creation-card__meta span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 0.8rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--role-border);
  color: #2f4460;
  font-size: 0.8rem;
  font-weight: 700;
}

.role-creation-card .form-sheet {
  border-color: rgba(214, 225, 239, 0.98);
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(6px);
}

.role-creation-card__submit {
  width: 100%;
}

.role-creation-card--partner .role-creation-card__submit {
  background: linear-gradient(135deg, #1f9d68 0%, #11754c 100%);
}

.role-creation-card--admin .role-creation-card__submit {
  background: linear-gradient(135deg, #123f97 0%, #4e86e4 100%);
}

.role-creation-card--agent .role-creation-card__submit {
  background: linear-gradient(135deg, #f0a93a 0%, #c67e06 100%);
  color: #fff;
}

.account-role-panel {
  --account-role-accent: #4e86e4;
  --account-role-surface: rgba(78, 134, 228, 0.08);
  --account-role-border: rgba(78, 134, 228, 0.18);
  overflow: hidden;
  border: 1px solid var(--account-role-border);
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.98) 0%,
    var(--account-role-surface) 100%
  );
}

.account-role-panel--admin {
  --account-role-accent: #2f61d2;
  --account-role-surface: rgba(62, 113, 216, 0.1);
  --account-role-border: rgba(62, 113, 216, 0.22);
}

.account-role-panel--partner {
  --account-role-accent: #1f9d68;
  --account-role-surface: rgba(31, 157, 104, 0.1);
  --account-role-border: rgba(31, 157, 104, 0.2);
}

.account-role-panel--agent {
  --account-role-accent: #f0a93a;
  --account-role-surface: rgba(240, 169, 58, 0.12);
  --account-role-border: rgba(240, 169, 58, 0.24);
}

.account-role-panel__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  background:
    radial-gradient(
      circle at top right,
      rgba(255, 255, 255, 0.74),
      transparent 30%
    ),
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.96) 0%,
      rgba(255, 255, 255, 0.72) 100%
    );
}

.account-role-panel__kicker {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 0.8rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--account-role-border);
  color: var(--account-role-accent);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.account-role-panel__lede {
  margin: 0.45rem 0 0;
  max-width: 860px;
  color: #495c74;
  line-height: 1.5;
}

.account-role-panel__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-end;
}

.account-role-panel__stats span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 0.9rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--account-role-border);
  color: #28405f;
  font-size: 0.82rem;
  font-weight: 700;
}

.account-edit-spotlight {
  display: grid;
  gap: 1rem;
  margin: 1rem;
  padding: 1rem;
  border: 1px solid var(--account-role-border);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.74);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

.account-edit-spotlight__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.account-edit-spotlight__kicker {
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--account-role-accent);
}

.account-edit-spotlight__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-end;
}

.account-edit-spotlight__meta span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 0.8rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--account-role-border);
  color: #2a415f;
  font-size: 0.8rem;
  font-weight: 700;
}

.account-role-table {
  padding: 0 1rem 1rem;
}

.table-role-ledger {
  overflow: hidden;
  border: 1px solid rgba(211, 223, 237, 0.95);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.84);
}

.table-role-ledger thead th {
  background: rgba(255, 255, 255, 0.88);
}

.table-role-ledger tbody tr:hover {
  background: rgba(255, 255, 255, 0.5);
}

.account-listing-ident {
  display: grid;
  gap: 0.2rem;
}

.account-listing-ident strong {
  color: #17263a;
}

.account-listing-ident span {
  font-size: 0.8rem;
  color: #607389;
}

.hero-banner {
  padding: 1.4rem 1.4rem 1rem;
  margin-bottom: 1.5rem;
  background: linear-gradient(
    135deg,
    rgba(67, 122, 234, 0.95),
    rgba(105, 152, 246, 0.78)
  );
  border-radius: 28px;
  color: #fff;
  box-shadow: var(--shadow);
}

.hero-banner h1,
.hero-banner p {
  color: inherit;
}

.section-kicker {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
  font-weight: 700;
  opacity: 0.78;
}

.dashboard-shell {
  display: grid;
  grid-template-columns: 290px 1fr;
  gap: 1.4rem;
}

.sidebar {
  background: rgba(11, 18, 32, 0.96);
  color: #eaf0ff;
  border-radius: 28px;
  padding: 1.25rem;
  box-shadow: var(--shadow);
  align-self: start;
  position: sticky;
  top: 16px;
}

.sidebar h2,
.sidebar .form-label {
  color: #b7c4e1;
}

.sidebar .form-control,
.sidebar .form-select,
.sidebar input,
.sidebar select {
  background: rgba(255, 255, 255, 0.95);
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
}

.metric-card {
  position: relative;
  padding: var(--space-4) var(--space-4) var(--space-4) var(--space-5);
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--primary-pale);
  box-shadow: 0 1px 2px rgba(20, 38, 68, 0.04), 0 6px 16px rgba(20, 38, 68, 0.06);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.metric-card:hover {
  transform: translateY(-2px);
  border-color: var(--line);
  border-left-color: var(--primary);
  box-shadow: 0 2px 4px rgba(20, 38, 68, 0.05), 0 14px 30px rgba(20, 38, 68, 0.1);
}

.metric-card .label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: var(--space-2);
}

.metric-card .value {
  font-size: 1.9rem;
  font-weight: 800;
  line-height: 1.1;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.scope-banner {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 1rem;
  padding: 0.9rem 1rem;
  background: rgba(62, 113, 216, 0.08);
  border: 1px solid rgba(62, 113, 216, 0.14);
  border-radius: 18px;
}

.modal-like {
  width: 100%;
  max-width: 100%;
  margin: 0;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(155, 185, 224, 0.6);
  border-radius: 0;
  box-shadow: 0 24px 70px rgba(19, 42, 77, 0.18);
  overflow: hidden;
}

.agency-editor-window {
  background: rgba(255, 255, 255, 0.94);
}

.modal-ribbon {
  height: 26px;
  background: linear-gradient(180deg, #7fb0dc 0%, #4e95d0 100%);
  border-bottom: 1px solid rgba(64, 116, 161, 0.7);
}

.agency-editor {
  padding-top: 1.35rem;
}

.agency-editor-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.2rem;
  padding: 0 0 1rem;
  border-bottom: 1px dashed #cfd6df;
}

.agency-editor-head {
  max-width: 760px;
}

.agency-editor-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.55rem;
}

.agency-editor-card {
  border-radius: 20px;
  box-shadow: none;
  border-color: rgba(194, 207, 222, 0.95);
  background: rgba(255, 255, 255, 0.86);
}

.agency-editor-card-body {
  padding-top: 1rem;
}

.form-sheet {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1.2rem;
}

.agency-form-sheet {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.98),
    rgba(248, 250, 253, 0.98)
  );
  border-color: #cfd9e6;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.form-panel-heading {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  margin-bottom: 1rem;
}

.form-panel-heading h2 {
  margin: 0;
  font-size: 1.06rem;
  color: #28457f;
}

.form-panel-heading p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.placeholder-sheet .empty-state {
  margin-top: 0.5rem;
  background: #f3f6fb;
}

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

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

.field-stack label {
  display: block;
  font-size: 0.92rem;
  font-weight: 700;
  color: #111827;
  margin-bottom: 0.4rem;
}

.dossier-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 1.25rem;
  text-align: left;
  padding: 1.5rem 1.75rem;
  background: linear-gradient(150deg, #f2f6ff 0%, #e8f0fe 100%);
  border: 1px solid rgba(99, 139, 220, 0.22);
  border-radius: 20px;
}

.dossier-hero-head {
  flex: 1;
  min-width: 0;
}

.dossier-hero-title {
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  line-height: 1.1;
  color: #16345f;
  font-weight: 800;
}

.dossier-hero-meta {
  max-width: 100%;
  color: #506480;
  font-size: 0.88rem;
  overflow-wrap: anywhere;
}

.dossier-hero-actions {
  flex-shrink: 0;
  align-self: flex-start;
}

.dossier-hero-avatar {
  flex-shrink: 0;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1e40af 0%, #2563eb 100%);
  border: 2px solid rgba(59, 130, 246, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
  user-select: none;
  margin-top: 4px;
}

.dossier-hero-status-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.dossier-identity-bar {
  background: #f8fafd;
  border: 1px solid #e2eaf4;
  border-radius: 14px;
  padding: 0.75rem 1rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.form-error {
  margin-top: 0.45rem;
  font-size: 0.88rem;
  color: var(--danger);
}

.alert {
  margin-bottom: 0.8rem;
  padding: 0.95rem 1rem;
  border-radius: 14px;
  border: 1px solid transparent;
  box-shadow: 0 8px 24px rgba(36, 58, 89, 0.08);
}

.alert-success {
  color: #0b6b45;
  background: rgba(31, 157, 104, 0.12);
  border-color: rgba(31, 157, 104, 0.22);
}

.alert-error,
.alert-danger {
  color: #972a27;
  background: rgba(217, 83, 79, 0.12);
  border-color: rgba(217, 83, 79, 0.22);
}

.alert-info {
  color: #204caa;
  background: rgba(62, 113, 216, 0.12);
  border-color: rgba(62, 113, 216, 0.22);
}

.alert-secondary {
  color: #4f5f71;
  background: rgba(123, 137, 156, 0.14);
  border-color: rgba(123, 137, 156, 0.24);
}

.crm-flash-overlay {
  position: fixed;
  top: 112px;
  right: 18px;
  left: auto;
  bottom: auto;
  z-index: 12000;
  display: grid;
  gap: 12px;
  width: min(380px, calc(100vw - 24px));
  max-width: calc(100vw - 24px);
  pointer-events: none;
}

.crm-flash-overlay.is-hidden {
  display: none;
}

.crm-flash-modal {
  display: none;
}

.crm-flash-modal__ribbon {
  display: none;
}

.crm-flash-modal__body {
  padding: 0;
}

.crm-flash-modal__header {
  display: none;
}

.crm-flash-modal__header h2 {
  margin: 0;
}

.crm-flash-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  top: 10px;
  right: 10px;
  width: 30px;
  height: 30px;
  border: 1px solid #c8d7eb;
  border-radius: 10px;
  background: #f4f8fe;
  color: #244ca8;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  opacity: 0.78;
  transition:
    opacity 0.16s ease,
    transform 0.16s ease;
  pointer-events: auto;
}

.crm-flash-close:hover,
.crm-flash-close:focus {
  opacity: 1;
  transform: scale(1.03);
}

.crm-flash-stack {
  display: grid;
  gap: 12px;
}

.crm-flash-card {
  position: relative;
  border-radius: 16px;
  border: 1px solid transparent;
  padding: 14px 44px 14px 16px;
  box-shadow: 0 18px 32px rgba(36, 58, 89, 0.16);
  pointer-events: auto;
  backdrop-filter: blur(6px);
}

.crm-flash-card__topline {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.crm-flash-card__content {
  min-width: 0;
}

.crm-flash-card__icon-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.55);
  flex: 0 0 42px;
}

.crm-flash-card__icon {
  width: 22px;
  height: 22px;
}

.crm-flash-card__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.crm-flash-card__message {
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.35;
}

.crm-flash-toast {
  animation: crmToastIn 0.22s ease-out;
  transition:
    opacity 0.18s ease,
    transform 0.18s ease;
}

.crm-flash-toast.is-closing {
  opacity: 0;
  transform: translateX(18px);
}

.crm-flash-card--success {
  color: #0b6b45;
  background: linear-gradient(
    180deg,
    rgba(31, 157, 104, 0.12),
    rgba(31, 157, 104, 0.06)
  );
  border-color: rgba(31, 157, 104, 0.26);
}

.crm-flash-card--success .crm-flash-card__badge {
  background: rgba(31, 157, 104, 0.18);
  color: #0b6b45;
}

.crm-flash-card--success .crm-flash-card__icon-wrap,
.crm-flash-card--success .crm-flash-card__icon {
  color: #0b6b45;
}

.crm-flash-card--error,
.crm-flash-card--danger {
  color: #972a27;
  background: linear-gradient(
    180deg,
    rgba(217, 83, 79, 0.14),
    rgba(217, 83, 79, 0.08)
  );
  border-color: rgba(217, 83, 79, 0.28);
}

.crm-flash-card--error .crm-flash-card__badge,
.crm-flash-card--danger .crm-flash-card__badge {
  background: rgba(217, 83, 79, 0.18);
  color: #972a27;
}

.crm-flash-card--error .crm-flash-card__icon-wrap,
.crm-flash-card--error .crm-flash-card__icon,
.crm-flash-card--danger .crm-flash-card__icon-wrap,
.crm-flash-card--danger .crm-flash-card__icon {
  color: #972a27;
}

.crm-flash-card--warning {
  color: #8b5b00;
  background: linear-gradient(
    180deg,
    rgba(240, 169, 58, 0.18),
    rgba(240, 169, 58, 0.08)
  );
  border-color: rgba(240, 169, 58, 0.28);
}

.crm-flash-card--warning .crm-flash-card__badge {
  background: rgba(240, 169, 58, 0.22);
  color: #8b5b00;
}

.crm-flash-card--warning .crm-flash-card__icon-wrap,
.crm-flash-card--warning .crm-flash-card__icon {
  color: #8b5b00;
}

.crm-flash-card--info {
  color: #204caa;
  background: linear-gradient(
    180deg,
    rgba(62, 113, 216, 0.14),
    rgba(62, 113, 216, 0.06)
  );
  border-color: rgba(62, 113, 216, 0.24);
}

.crm-flash-card--info .crm-flash-card__badge {
  background: rgba(62, 113, 216, 0.18);
  color: #204caa;
}

.crm-flash-card--info .crm-flash-card__icon-wrap,
.crm-flash-card--info .crm-flash-card__icon {
  color: #204caa;
}

.crm-flash-actions {
  display: none;
}

.crm-flash-confirm {
  display: none;
}

.crm-flash-confirm--danger {
  display: none;
}

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

@media (max-width: 640px) {
  .crm-flash-overlay {
    top: auto;
    right: 12px;
    bottom: 12px;
    width: calc(100vw - 24px);
  }
}

.badge-soft {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  margin: 0 0.35rem 0.35rem 0;
  border-radius: 999px;
  background: var(--primary-pale);
  color: var(--primary);
  font-size: 0.82rem;
  font-weight: 700;
}

.entity-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
}

.sheet-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 1.35rem;
  background: #eef2f7;
  border-radius: 18px;
}

.agency-sheet-actions {
  justify-content: flex-start;
  background: linear-gradient(180deg, #eef2f7 0%, #e8edf4 100%);
  border: 1px solid #d3dce8;
}

.sheet-actions form {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.form-check-input {
  width: 20px;
  height: 20px;
  min-height: auto;
  padding: 0;
}

.crm-checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1.4rem;
  padding: 0.8rem 1rem;
  background: #f7faff;
  border: 1px solid #d6e1ef;
  border-radius: 16px;
}

.crm-checkbox-group--grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.crm-checkbox-option {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--text);
  font-weight: 500;
}

.member-checklist {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  max-height: 260px;
  padding: 0.9rem 1rem;
  overflow-y: auto;
  background: #fff;
  border: 1px solid #c7d5e6;
  border-radius: 16px;
}

.member-checklist-item {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.35rem 0.15rem;
  cursor: pointer;
}

.member-checklist-item.is-hidden {
  display: none;
}

.member-checklist-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 0;
  flex: 0 0 auto;
}

.member-checklist-label {
  color: var(--text);
  line-height: 1.35;
}

.member-checklist-empty {
  color: var(--muted);
  font-size: 0.92rem;
}

.crm-modal-window {
  width: 100%;
  background: #fff;
  border: 1px solid #8fb7df;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.12);
}

.crm-modal-ribbon {
  position: relative;
  height: 28px;
  background: linear-gradient(180deg, #8ec0ea 0%, #5a9dd4 100%);
  border-bottom: 1px solid #5f94c2;
}

.crm-modal-close {
  position: absolute;
  right: 8px;
  top: 2px;
  width: 22px;
  height: 22px;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 1.2rem;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  line-height: 22px;
}

.crm-modal-body {
  padding: 12px 18px 14px;
  background: #fff;
}

.crm-modal-headline {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  border-bottom: 1px dashed #cfd3d8;
  padding-bottom: 8px;
  margin-bottom: 10px;
}

.crm-modal-headline h1 {
  margin: 0;
  color: #375eb0;
  font-size: 1.05rem;
  font-weight: 800;
}

.crm-tabs-wrap {
  margin-bottom: 0;
}

.crm-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.crm-tab {
  min-height: 28px;
  padding: 0 12px;
  border: 0;
  border-radius: 10px 10px 0 0;
  background: #0d2150;
  color: #d8e8ff;
  font-size: 0.82rem;
  font-weight: 700;
}

.crm-tab.active {
  background: #4167b7;
}

.crm-tab-content {
  margin-top: 0;
}

.crm-card {
  border: 1px solid #c9cdd2;
  border-radius: 12px;
  padding: 14px;
  background: #fcfcfc;
}

.crm-empty-card {
  min-height: 18px;
}

.crm-form-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 12px 14px;
}

/* Wrapper transparent pour le filtrage dynamique des champs par type de dossier */
.champ-wrapper {
  display: contents;
}
.champ-wrapper.champ-hidden {
  display: none !important;
}
.champ-wrapper.champ-hidden > * {
  display: none !important;
}

/* Séparateur de sous-section dans la grille client (multi-types) */
.crm-type-section-sep {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
  margin-bottom: 4px;
  padding: 8px 14px;
  background: #eef2fb;
  border-left: 4px solid #4167b7;
  border-radius: 0 6px 6px 0;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #2a4a9a;
}

.crm-form-grid--compact {
  gap: 10px 14px;
}

.crm-form-grid--attribution {
  align-items: start;
}

.crm-field {
  min-width: 0;
}

.crm-field label {
  display: block;
  margin-bottom: 4px;
  color: #333;
  font-size: 0.84rem;
}

.crm-field--full {
  grid-column: 1 / -1;
}

.crm-field--wide {
  grid-column: span 6;
}

.crm-field--md {
  grid-column: span 4;
}

.crm-field--sm {
  grid-column: span 2;
}

.crm-field--phone {
  grid-column: span 4;
}

.crm-installation-picker {
  display: grid;
  gap: 10px;
}

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

.crm-installation-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px;
  gap: 10px;
  align-items: center;
}

.crm-installation-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
}

.crm-installation-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid #9cb7d7;
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #edf4fc 100%);
  color: #123564;
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease,
    border-color 0.15s ease;
}

.crm-installation-action .ui-icon {
  width: 18px;
  height: 18px;
  flex-basis: 18px;
  margin-right: 0;
}

.crm-installation-action:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 10px 18px rgba(38, 80, 128, 0.12);
  border-color: #6f98c9;
}

.crm-installation-action:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
}

.crm-installation-action--add {
  background: linear-gradient(180deg, #eff8ef 0%, #dff1e2 100%);
  border-color: #97c3a1;
  color: #1e6c3d;
}

.crm-installation-action--remove {
  background: linear-gradient(180deg, #fff7f7 0%, #fde8e8 100%);
  border-color: #ddb0b0;
  color: #a63d3d;
}

.crm-inline-split {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 6px;
}

.crm-phone-prefix {
  text-align: center;
}

.crm-secondary-box {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin-top: 16px;
  padding: 14px;
  border: 1px solid #d8dbe0;
  background: #fff;
}

.crm-modal-header {
  margin-bottom: 18px;
}

.crm-subtitle {
  margin: 6px 0 0;
  color: #5b6676;
  font-size: 0.92rem;
}

.crm-field-row {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  margin-bottom: 12px;
}

.crm-field-label {
  padding-top: 10px;
  color: #313131;
  font-size: 0.88rem;
  font-weight: 600;
}

.crm-field-control {
  min-width: 0;
}

.crm-help {
  margin-top: 4px;
  color: #617186;
  font-size: 0.8rem;
}

.crm-error,
.crm-error-block {
  color: #a32222;
  font-size: 0.82rem;
}

.crm-error-block {
  margin: 10px 0;
}

.crm-footer-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
  padding: 16px 0 0;
  border-top: 1px solid #d7dce4;
}

.crm-footer-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid #c7d1e4;
  border-radius: 10px;
  background: #eef3fb;
  color: #20314c;
  font-weight: 700;
  text-decoration: none;
}

.crm-footer-btn.primary {
  border-color: #315ed0;
  background: #315ed0;
  color: #fff;
}

.crm-inline-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
}

.crm-inline-tag {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.crm-mini-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding: 0 12px;
  border: 0;
  border-radius: 3px;
  background: var(--primary);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
}

.crm-section-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: #2d2d2d;
  margin-bottom: 10px;
}

.crm-badge-auto {
  display: inline-block;
  background: #e8f0fe;
  color: #3c6ac4;
  font-size: .65rem;
  font-weight: 600;
  padding: 1px 5px;
  border-radius: 4px;
  vertical-align: middle;
  margin-left: 4px;
  letter-spacing: .02em;
}

/* Bloc "Suivi du dossier" en lecture seule dans l'onglet Client (visible partenaires) */
.crm-card--readonly-dates {
  background: #f8f9fb;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 16px 18px;
}
.crm-card--readonly-dates .crm-section-title {
  color: #4a5568;
}
.crm-card--readonly-dates .crm-muted-line {
  font-style: italic;
  margin-bottom: 12px;
}
.crm-card--readonly-dates input[readonly] {
  background: #fff;
  color: #4a5568;
  cursor: default;
  border-color: #e2e8f0;
}


.crm-upload-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  font-size: 0.82rem;
}

.crm-muted-line {
  color: #555;
  font-size: 0.82rem;
}

.crm-legal-block {
  padding: 10px 12px;
  border: 1px solid #d5d9dd;
  border-radius: 12px;
  margin-bottom: 10px;
  background: #fff;
}

.crm-footer-actions {
  display: flex;
  gap: 4px;
  padding: 16px 18px;
  background: #eef0f2;
  margin-top: 14px;
}

.crm-main-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 200px;
  min-height: 40px;
  padding: 0 18px;
  border: 0;
  background: var(--primary);
  color: #fff;
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
}

.crm-main-btn--secondary {
  background: #1a3a7a;
}

.crm-form-errors {
  margin-bottom: 12px;
}

.crm-form-error {
  color: #9d1c1c;
  font-size: 0.82rem;
}

.page-note {
  font-size: 0.92rem;
  color: var(--muted);
}
.page-note--warning {
  padding: 0.65rem 1rem;
  border-radius: 8px;
  background: #fef9c3;
  border-left: 4px solid #ca8a04;
  color: #713f12;
  font-size: 0.88rem;
}

.history-entry {
  padding: 1rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fbfcfe;
  margin-bottom: 0.8rem;
}

.history-day-card {
  margin-bottom: 1rem;
  padding: 1rem 1.1rem;
  border: 1px solid #d4deea;
  border-radius: 18px;
  background: linear-gradient(180deg, #f8fbff 0%, #f1f6fc 100%);
  box-shadow: 0 14px 28px rgba(25, 48, 79, 0.05);
}

.history-day-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  margin-bottom: 0.85rem;
  flex-wrap: wrap;
}

.history-day-card__date {
  font-size: 1rem;
  font-weight: 800;
  color: #18314f;
}

.history-day-card__meta {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #5f748d;
}

.history-day-card__entries {
  display: grid;
  gap: 0.7rem;
}

.history-entry--nested {
  margin-bottom: 0;
  background: #ffffff;
}

.history-entry--fiche-client {
  border-left: 4px solid #2563eb;
  background: linear-gradient(90deg, #eff6ff 0%, #f8fbff 100%);
}

.history-entry__category-badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: #dbeafe;
  color: #1e40af;
  border: 1px solid #bfdbfe;
  border-radius: 6px;
  padding: 0.1em 0.55em;
  margin-right: 0.5em;
  vertical-align: middle;
}

.history-collapsible {
  border: 1px solid #d4deea;
  border-radius: 18px;
  background: #ffffff;
  padding: 0;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(25, 48, 79, 0.04);
}

.history-collapsible__summary {
  cursor: pointer;
  padding: 0.9rem 1.1rem;
  font-weight: 700;
  color: #18314f;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  background: linear-gradient(180deg, #f8fbff 0%, #eef3fa 100%);
}

.history-collapsible__summary::-webkit-details-marker {
  display: none;
}

.history-collapsible__summary::after {
  content: "▾";
  font-size: 0.9rem;
  color: #5f748d;
  margin-left: auto;
  transition: transform 0.15s ease;
}

.history-collapsible[open] > .history-collapsible__summary::after {
  transform: rotate(180deg);
}

.mention-box {
  position: relative;
}

.mention-list {
  position: absolute;
  z-index: 30;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  margin: 0;
  padding: 4px;
  list-style: none;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  box-shadow: 0 12px 28px rgba(20, 38, 68, 0.16);
  max-height: 220px;
  overflow-y: auto;
}

.mention-item {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
  padding: 7px 10px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--text);
}

.mention-item strong {
  color: var(--primary);
  font-weight: 700;
}

.mention-item span {
  color: var(--muted);
  font-size: 0.78rem;
}

.mention-item.active,
.mention-item:hover {
  background: var(--primary-pale);
}
  transform: rotate(180deg);
}

.history-collapsible__content {
  padding: 1rem 1.1rem;
  border-top: 1px solid #e5ecf5;
  background: #fbfcfe;
}

.empty-state {
  padding: var(--space-6) var(--space-5);
  border-radius: var(--radius-md);
  background: var(--surface-alt);
  border: 1px solid var(--line);
  color: var(--muted);
  text-align: center;
  font-size: 0.9rem;
  line-height: 1.5;
}

.excel-page {
  padding: 8px 0 24px;
}

.excel-window {
  width: 100%;
  margin: 0;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(115, 162, 208, 0.35);
  border-radius: 20px;
  box-shadow: 0 4px 24px rgba(20, 38, 68, 0.08), 0 1px 4px rgba(20, 38, 68, 0.05);
  overflow: hidden;
}

.excel-window-body {
  padding: 16px 16px 18px;
  background: #fff;
}

.excel-ribbon-title {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  padding-bottom: 10px;
  border-bottom: 1px dashed #cfd6df;
}

.excel-ribbon-title h1,
.excel-ribbon-title h2 {
  margin: 0;
  color: #2d56a7;
  font-size: clamp(1.8rem, 3vw, 2.25rem);
  line-height: 1.05;
}

.excel-ribbon-subtitle {
  margin-top: 0.25rem;
  font-size: 0.88rem;
  color: #4f5e6d;
}

.excel-panel {
  margin-top: 14px;
  background: #fff;
  border: 1px solid #d4dbe5;
  border-radius: 18px;
  overflow: hidden;
}

.excel-panel-header {
  padding: 14px 18px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  background: linear-gradient(180deg, #0d2150 0%, #152d6b 100%);
}

.excel-panel-header h2,
.excel-panel-header h3 {
  margin: 0;
  font-size: 1.06rem;
  color: rgba(220, 235, 255, 0.92);
}

.excel-panel-body {
  padding: 18px;
}

.excel-actions-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  padding: 14px 18px;
  background: #edf1f6;
  border-radius: 16px;
}

.excel-actions-bar form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
}

.excel-window .table thead th {
  background: linear-gradient(180deg, #f0f4fb 0%, #e4ecf7 100%);
  color: #1e3a6e;
  border-bottom: 1px solid #c6d4e8;
  font-size: 0.78rem;
}

.excel-window .table tbody td {
  font-size: 0.84rem;
}

.icon-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(180deg, #f4f7fb 0%, #e6edf7 100%);
  border: 1px solid #bfd0e6;
  color: #244ca8;
}

.inline-icon-form {
  margin: 0;
}

.signal-cell-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
}

.icon-action-btn .ui-icon {
  margin-right: 0;
  width: 17px;
  height: 17px;
  flex-basis: 17px;
}

.icon-action-btn:hover {
  text-decoration: none;
  background: linear-gradient(180deg, #e8f0ff 0%, #d9e8ff 100%);
}

.icon-action-btn.signal {
  color: #8d5b00;
  border-color: #ead7a7;
  background: linear-gradient(180deg, #fff7df 0%, #f7ebbf 100%);
}

/* Rappel en retard → rouge */
.icon-action-btn.signal.signal--overdue {
  color: #8f1212;
  border-color: #f5b0b0;
  background: linear-gradient(180deg, #fff0f0 0%, #fdd5d5 100%);
}

/* Rappel futur (planifié) → bleu neutre */
.icon-action-btn.signal.signal--future {
  color: #1a4fa3;
  border-color: #b9d0f5;
  background: linear-gradient(180deg, #f0f6ff 0%, #ddeaff 100%);
}

.icon-action-btn.signal.is-active {
  color: #8f3d00;
  border-color: #efc78b;
  background: linear-gradient(180deg, #ffe9c7 0%, #ffd79d 100%);
}

.excel-tag-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 0.7rem;
  border-radius: 999px;
  background: linear-gradient(180deg, #e6f0ff 0%, #d8e6ff 100%);
  border: 1px solid #b9cff6;
  color: #244ca8;
  font-size: 0.76rem;
  font-weight: 700;
  text-decoration: none;
}

.excel-tag-pill:hover {
  text-decoration: none;
  filter: brightness(0.97);
}

.excel-tag-pill .ui-icon {
  width: 13px;
  height: 13px;
  flex-basis: 13px;
  margin-right: 0.38rem;
}

.excel-tag-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.excel-tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.18rem;
  border-radius: 999px;
  background: rgba(232, 239, 248, 0.58);
}

.excel-tag-chip--payment {
  background: rgba(255, 237, 228, 0.75);
}

.excel-tag-caption {
  display: inline-flex;
  align-items: center;
  padding: 0 0.46rem;
  min-height: 24px;
  border-radius: 999px;
  background: rgba(15, 23, 36, 0.08);
  color: #516170;
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.excel-tag-chip--payment .excel-tag-caption {
  background: rgba(143, 66, 19, 0.12);
  color: #8f4213;
}

.excel-tag-pill--manual {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}

.excel-tag-pill--payment {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28);
}

.excel-tag-remove-form {
  display: inline-flex;
  margin: 0;
}

.excel-tag-remove-btn {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid #cbd8ea;
  background: #ffffff;
  color: #5f7084;
  font-size: 0.95rem;
  line-height: 1;
  cursor: pointer;
}

.excel-tag-remove-btn:hover {
  background: #f4f7fb;
  color: #233446;
}

.tag-cell-wrap {
  display: flex;
  align-items: flex-start;
  gap: 0.35rem;
}

.excel-tag-menu {
  position: relative;
}

.excel-tag-menu summary {
  list-style: none;
  cursor: pointer;
}

.excel-tag-menu summary::-webkit-details-marker {
  display: none;
}

.excel-tag-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 30;
  min-width: 220px;
  padding: 0.45rem;
  border-radius: 12px;
  border: 1px solid #c6d6ea;
  background: #fff;
  box-shadow: 0 18px 32px rgba(18, 36, 66, 0.16);
}

.excel-tag-dropdown form + form {
  margin-top: 0.35rem;
}

.excel-tag-option {
  width: 100%;
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0 0.7rem;
  cursor: pointer;
}

.excel-tag-option .ui-icon {
  width: 13px;
  height: 13px;
  flex-basis: 13px;
  margin-right: 0.38rem;
}

.excel-mini-badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 0.45rem;
  border-radius: 999px;
  background: #ffe8bf;
  color: #8d5b00;
  font-size: 0.68rem;
  font-weight: 700;
}

.dashboard-action-mentions {
  margin: 0 0 1rem;
  padding: 0.85rem 1rem;
  border: 1px solid #d7e2f2;
  border-radius: 14px;
  background: #f7faff;
}

.dashboard-action-mention-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.55rem;
}

.dashboard-action-mention-list .excel-tag-pill {
  cursor: pointer;
}

.excel-tag-pill.is-empty {
  padding: 0 0.45rem;
  min-width: 30px;
  justify-content: center;
}

.excel-tag-pill.is-empty .ui-icon {
  margin-right: 0;
}

.excel-tag-pill.tone-sky {
  background: linear-gradient(180deg, #dff3ff 0%, #cae7ff 100%);
  border-color: #b7d7f4;
  color: #1f5f95;
}

.excel-tag-pill.tone-mint {
  background: linear-gradient(180deg, #def9e7 0%, #c6f0d7 100%);
  border-color: #b1dfc3;
  color: #187249;
}

.excel-tag-pill.tone-gold {
  background: linear-gradient(180deg, #fff1c9 0%, #ffe3a1 100%);
  border-color: #f0d08a;
  color: #8f5b00;
}

.excel-tag-pill.tone-coral {
  background: linear-gradient(180deg, #ffe0da 0%, #ffc7bd 100%);
  border-color: #efb4a5;
  color: #9c4031;
}

.excel-tag-pill.tone-violet {
  background: linear-gradient(180deg, #efe1ff 0%, #e0cdfc 100%);
  border-color: #d0b9f5;
  color: #5d3d9a;
}

.excel-tag-pill.tone-indigo {
  background: linear-gradient(180deg, #dde4ff 0%, #cdd8ff 100%);
  border-color: #b9c7f4;
  color: #334c9c;
}

.excel-tag-pill.tone-muted {
  background: linear-gradient(180deg, #eef2f7 0%, #e4eaf2 100%);
  border-color: #ced8e4;
  color: #627180;
}

.excel-action-cell {
  text-align: center;
  width: 58px;
}

.excel-inline-note {
  font-size: 0.75rem;
  color: #5f7084;
}

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

.stat-card {
  position: relative;
  padding: var(--space-4) var(--space-4) var(--space-4) var(--space-5);
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  border-left: 3px solid var(--primary-pale);
  background: var(--surface);
  box-shadow: 0 1px 2px rgba(20, 38, 68, 0.04), 0 6px 16px rgba(20, 38, 68, 0.06);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.stat-card:hover {
  transform: translateY(-2px);
  border-left-color: var(--primary);
  box-shadow: 0 2px 4px rgba(20, 38, 68, 0.05), 0 14px 30px rgba(20, 38, 68, 0.1);
}

.stat-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: var(--space-2);
}

.stat-value {
  font-size: 1.9rem;
  font-weight: 800;
  line-height: 1.1;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

/* Cartes KPI : code couleur semantique */
.metric-card--success,
.stat-card--success {
  border-left-color: var(--success);
}
.metric-card--success:hover,
.stat-card--success:hover {
  border-left-color: var(--success);
}
.metric-card--success .value,
.stat-card--success .stat-value {
  color: var(--success);
}

.metric-card--warning,
.stat-card--warning {
  border-left-color: var(--warning);
}
.metric-card--warning:hover,
.stat-card--warning:hover {
  border-left-color: var(--warning);
}
.metric-card--warning .value,
.stat-card--warning .stat-value {
  color: #b9791a;
}

.metric-card--danger,
.stat-card--danger {
  border-left-color: var(--danger);
}
.metric-card--danger:hover,
.stat-card--danger:hover {
  border-left-color: var(--danger);
}
.metric-card--danger .value,
.stat-card--danger .stat-value {
  color: var(--danger);
}

.metric-card--info,
.stat-card--info {
  border-left-color: var(--primary);
}
.metric-card--info:hover,
.stat-card--info:hover {
  border-left-color: var(--primary);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 0.8rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  border: 1px solid transparent;
}

.status-pending {
  color: #7a4e00;
  background: rgba(255, 184, 0, 0.14);
  border-color: rgba(255, 184, 0, 0.24);
}

.status-running {
  color: #1f4db3;
  background: rgba(62, 113, 216, 0.14);
  border-color: rgba(62, 113, 216, 0.24);
}

.status-success {
  color: #0b6b45;
  background: rgba(31, 157, 104, 0.14);
  border-color: rgba(31, 157, 104, 0.24);
}

.status-failed {
  color: #972a27;
  background: rgba(217, 83, 79, 0.14);
  border-color: rgba(217, 83, 79, 0.24);
}

.dashboard-excel {
  background: #dbe8f6;
}

.excel-header-strip {
  background: linear-gradient(180deg, #0d2150, #152d6b);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.excel-modules {
  display: flex;
  align-items: stretch;
  gap: 0;
  overflow-x: auto;
}

.excel-module-form {
  margin: 0;
}

.excel-module-dropdown {
  position: relative;
}

.excel-module {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 22px;
  border: 0;
  background: transparent;
  color: rgba(226, 236, 252, 0.78);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
  text-decoration: none;
  transition:
    background 0.16s ease,
    color 0.16s ease;
}

.excel-module:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  text-decoration: none;
}

.excel-module.active,
.excel-module-dropdown:hover > .excel-module {
  background: #fff;
  color: var(--primary);
  text-decoration: none;
}

.excel-module.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 3px;
  background: var(--primary);
}

.excel-module-submenu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 150px;
  background: #0d2150;
  border: 1px solid rgba(155, 200, 243, 0.2);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.22);
  z-index: 10;
  display: none;
}

.excel-module-dropdown:hover .excel-module-submenu {
  display: block;
}

.excel-module-submenu a {
  display: flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
}

.excel-module-submenu a:hover {
  background: #2f61d2;
  color: #fff;
  text-decoration: none;
}

.excel-top-search-strip {
  padding: 14px 16px;
  background: #ffffff;
  border-top: none;
  border-bottom: none;
  box-shadow: none;
}

.excel-top-search-wrap {
  display: grid;
  gap: 0.55rem;
  background: linear-gradient(180deg, #0d2150 0%, #152d6b 100%);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 20px;
  padding: 14px 20px 16px;
  box-shadow: 0 8px 28px rgba(8, 28, 90, 0.22), inset 0 1px 0 rgba(255,255,255,0.10);
}

.excel-top-search-heading {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.55rem;
}

.excel-top-search-autocomplete {
  position: relative;
}

.excel-top-search-label {
  margin: 0;
  font-size: 0.73rem;
  font-weight: 700;
  color: rgba(210, 228, 255, 0.8);
  letter-spacing: .04em;
  text-transform: uppercase;
}

.excel-top-search-input {
  width: 100%;
  min-height: 52px;
  padding: 0 22px;
  border: 1.5px solid #cddaea;
  border-radius: 999px;
  background: #f7fafd;
  box-shadow: inset 0 1px 3px rgba(8, 30, 60, 0.06);
  font-size: 1rem;
  color: #162334;
  transition: border-color .18s, box-shadow .18s, background .18s;
}

.excel-top-search-input:focus {
  border-color: #3b82f6;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.excel-top-search-results {
  top: calc(100% + 8px);
  border-radius: 16px;
  padding: 6px;
  border-color: #c8d9ee;
  box-shadow: 0 16px 34px rgba(23, 48, 75, 0.12);
}

.excel-top-search-results .excel-dashboard-autocomplete-option,
.excel-top-search-results .excel-dashboard-autocomplete-empty {
  min-height: 38px;
  padding: 9px 12px;
  font-size: 0.86rem;
  border-radius: 12px;
}

.dashboard-ai-chat {
  position: relative;
  display: inline-flex;
}

.dashboard-ai-chat--subnav {
  margin-left: auto;
  align-items: center;
}

.dashboard-ai-chat__trigger {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(196, 222, 251, 0.72);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 8px 18px rgba(2, 12, 31, 0.18);
  cursor: pointer;
  font-size: 1.1rem;
  font-weight: 900;
  line-height: 1;
}

.dashboard-ai-chat__trigger:hover,
.dashboard-ai-chat.is-open .dashboard-ai-chat__trigger {
  background: #ffffff;
  color: var(--primary);
}

.page-subnav .dashboard-ai-chat__trigger {
  width: 44px;
  height: 44px;
  background: #ffffff;
  color: var(--primary);
  border-color: #bfd6ef;
  box-shadow: 0 10px 24px rgba(13, 82, 138, 0.14);
}

.page-subnav .dashboard-ai-chat__trigger:hover,
.page-subnav .dashboard-ai-chat.is-open .dashboard-ai-chat__trigger {
  background: #173c83;
  color: #ffffff;
}

.dashboard-ai-chat__window {
  position: fixed;
  right: 20px;
  top: 188px;
  z-index: 90;
  width: min(440px, calc(100vw - 32px));
  max-height: calc(100vh - 220px);
  display: grid;
  grid-template-rows: auto minmax(160px, 1fr) auto;
  overflow: hidden;
  border: 1px solid #b8d0ea;
  border-radius: 20px;
  background: #f8fbff;
  box-shadow: 0 24px 70px rgba(6, 34, 90, 0.28);
}

.dashboard-ai-chat__window[hidden] {
  display: none;
}

.dashboard-ai-chat__window--subnav {
  top: 232px;
}

.dashboard-ai-chat__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  padding: 14px 16px;
  border-bottom: 1px solid #d3e1f0;
  background: #eef6ff;
}

.dashboard-ai-chat__eyebrow {
  margin: 0 0 2px;
  color: #5a6d83;
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dashboard-ai-chat__header h2 {
  margin: 0;
  color: #13243a;
  font-size: 1.05rem;
  font-weight: 900;
}

.dashboard-ai-chat__close {
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid #cad9eb;
  border-radius: 12px;
  background: #f7fbff;
  color: #13243a;
  font-weight: 800;
}

.dashboard-ai-chat__messages {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  overflow-y: auto;
}

.dashboard-ai-chat__message {
  width: fit-content;
  max-width: 76%;
  padding: 10px 12px;
  border-radius: 14px;
  white-space: pre-wrap;
  color: #13243a;
  font-size: 0.88rem;
  line-height: 1.42;
  text-align: left;
}

.dashboard-ai-chat__message--assistant {
  align-self: flex-start;
  border: 1px solid #d3e1f0;
  background: #ffffff;
  border-bottom-left-radius: 6px;
  box-shadow: 0 8px 18px rgba(16, 48, 84, 0.06);
}

.dashboard-ai-chat__message--user {
  align-self: flex-end;
  background: #173c83;
  color: #ffffff;
  border-bottom-right-radius: 6px;
}

.dashboard-ai-chat__message.is-loading {
  color: #5a6d83;
}

.dashboard-ai-chat__message.is-error {
  border-color: #f2b7b2;
  background: #fff2f1;
  color: #8a231c;
}

.dashboard-ai-chat__actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-top: 10px;
}

.dashboard-ai-chat__selection {
  display: block;
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #9ec4ed;
  border-radius: 10px;
  background: #eef6ff;
  color: #173c83;
  font-weight: 800;
  text-align: center;
}

.dashboard-ai-chat__selection:hover {
  background: #dfefff;
}

.dashboard-ai-chat__selection--secondary {
  border-color: #cbd8e8;
  background: #ffffff;
  color: #13243a;
}

.dashboard-ai-chat__selection--secondary:hover {
  background: #f5f9ff;
}

.dashboard-ai-chat__form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid #d3e1f0;
  background: #ffffff;
}

.dashboard-ai-chat__input {
  width: 100%;
  min-height: 42px;
  padding: 0 13px;
  border: 1px solid #c7d7ea;
  border-radius: 13px;
  background: #fff;
  color: #13243a;
  font-size: 0.9rem;
}

.dashboard-ai-chat__submit {
  min-height: 42px;
  padding: 0 14px;
  border: 0;
  border-radius: 13px;
  background: linear-gradient(135deg, #173c83 0%, #75b5eb 100%);
  color: #fff;
  font-weight: 900;
}

.dashboard-ai-chat__submit:disabled {
  opacity: 0.65;
}

.excel-shell {
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
  height: calc(100vh - 96px);
  min-height: calc(100vh - 96px);
  overflow: hidden;
  background: #ffffff;
  gap: 0;
}

.excel-sidebar {
  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.14) 0%,
      rgba(255, 255, 255, 0.03) 18%,
      rgba(255, 255, 255, 0) 100%
    ),
    linear-gradient(180deg, #0d2060 0%, #1a3fa3 100%);
  border-right: none;
  border-radius: 16px;
  margin: 12px 0 12px 12px;
  padding: 14px 10px 18px;
  overflow-y: auto;
  min-height: 0;
  color: #f7fbff;
  box-shadow: 4px 0 24px rgba(8, 28, 90, 0.14), 0 8px 24px rgba(8, 28, 90, 0.10);
}

.excel-sidebar-top-actions {
  display: grid;
  gap: 0.35rem;
  margin-bottom: 0.45rem;
}

.excel-filter-title {
  font-size: 0.88rem;
  font-weight: 700;
  margin-bottom: 0.45rem;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.filter-cfg-toggle {
  border: none;
  background: rgba(255,255,255,.15);
  color: #fff;
  border-radius: 6px;
  padding: 2px 5px;
  cursor: pointer;
  display: flex;
  align-items: center;
  opacity: .7;
  transition: opacity .15s, background .15s;
}
.filter-cfg-toggle:hover { opacity: 1; background: rgba(255,255,255,.28); }
.filter-cfg-toggle[aria-expanded="true"] {
  background: #2563eb;
  opacity: 1;
}

.excel-filter-form {
  display: grid;
  gap: 0.38rem;
}

.excel-filter-block {
  display: grid;
  gap: 0.32rem;
  margin-bottom: 0.5rem;
  padding-bottom: 0.45rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.22);
}

.excel-filter-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: #fff;
  margin-top: 0.15rem;
}

.excel-filter-input {
  min-height: 26px;
  border-radius: 6px;
  padding: 0 8px;
  font-size: 0.78rem;
  border: 1px solid rgba(188, 217, 241, 0.65);
  background: rgba(245, 250, 255, 0.92);
  color: #142236;
  box-shadow: none;
  transition: border-color .15s, box-shadow .15s;
}

.excel-filter-input-wide {
  min-height: 34px;
  padding: 0 10px;
  border-color: #8daecc;
  background: linear-gradient(180deg, #ffffff 0%, #f5faff 100%);
  font-size: 0.83rem;
}

.excel-filter-input-wide::placeholder {
  color: #64758a;
}

.excel-filter-input:focus {
  box-shadow: inset 0 0 0 1px #3c66d4;
}

.excel-multiselect {
  position: relative;
  display: grid;
  gap: 0.28rem;
}

.excel-autocomplete {
  overflow: visible;
}

.excel-multiselect-trigger {
  width: 100%;
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
  padding: 0 6px;
  border: 1px solid #b9b9b9;
  background: #fff;
  color: #2b2b2b;
  font-size: 0.78rem;
  cursor: pointer;
}

.excel-multiselect-trigger-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.excel-multiselect-trigger-caret {
  flex: 0 0 auto;
  color: #55657a;
}

.excel-multiselect-panel {
  display: none;
  padding: 4px;
  border: 1px solid #b9c3cf;
  background: #fff;
}

.excel-multiselect.is-open .excel-multiselect-panel {
  display: grid;
  gap: 0.3rem;
}

.excel-multiselect-search {
  margin: 0;
}

.excel-autocomplete-control {
  display: flex;
  flex-wrap: wrap;
  gap: 0.24rem;
  min-height: 24px;
  padding: 3px 4px;
  border: 1px solid #b9b9b9;
  background: #fff;
}

.excel-autocomplete-selection {
  display: flex;
  flex-wrap: wrap;
  gap: 0.22rem;
  width: 100%;
}

.excel-autocomplete-input {
  min-height: 20px;
  border: 0;
  padding: 0;
  flex: 1 1 100%;
}

.excel-autocomplete-input:focus {
  box-shadow: none;
}

.excel-autocomplete-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  max-width: 100%;
  min-height: 20px;
  padding: 0 6px;
  border: 1px solid #c8d7eb;
  background: #eef5ff;
  color: #244ca8;
  font-size: 0.72rem;
  cursor: pointer;
}

.excel-autocomplete-chip span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.excel-autocomplete-chip strong {
  font-size: 0.8rem;
  line-height: 1;
}

.excel-autocomplete-hint {
  font-size: 0.74rem;
  color: #6b7280;
}

.excel-dashboard-autocomplete {
  position: relative;
  display: grid;
  gap: 0.25rem;
}

.excel-dashboard-autocomplete-input {
  min-height: 24px;
}

.excel-dashboard-autocomplete-results {
  position: absolute;
  top: calc(100% + 2px);
  left: 0;
  right: 0;
  z-index: 30;
  display: grid;
  gap: 2px;
  max-height: 180px;
  overflow: auto;
  padding: 2px;
  border: 1px solid #b9c3cf;
  background: #fff;
  box-shadow: 0 10px 24px rgba(18, 36, 66, 0.16);
}

.excel-dashboard-autocomplete-option,
.excel-dashboard-autocomplete-empty {
  min-height: 24px;
  padding: 3px 6px;
  font-size: 0.76rem;
  text-align: left;
}

.excel-dashboard-autocomplete-option {
  border: 1px solid #c8d7eb;
  background: #f7fbff;
  color: #244ca8;
  cursor: pointer;
}

.excel-dashboard-autocomplete-option:hover {
  background: #e8f0ff;
}

.excel-dashboard-autocomplete-empty {
  color: #6b7280;
  background: #fff;
}

.excel-dashboard-autocomplete-selection {
  display: flex;
  flex-wrap: wrap;
  gap: 0.22rem;
}

.excel-dashboard-autocomplete-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  max-width: 100%;
  min-height: 20px;
  padding: 0 6px;
  border: 1px solid #c8d7eb;
  background: #eef5ff;
  color: #244ca8;
  font-size: 0.72rem;
  cursor: pointer;
}

.excel-dashboard-autocomplete-chip span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.excel-dashboard-autocomplete-chip strong {
  font-size: 0.8rem;
  line-height: 1;
}

.excel-status-autocomplete {
  position: relative;
  display: grid;
  gap: 0.25rem;
}

.excel-status-autocomplete-panel {
  display: none;
  padding: 4px;
  border: 1px solid #b9c3cf;
  background: #fff;
}

.excel-status-autocomplete.is-open .excel-status-autocomplete-panel {
  display: grid;
  gap: 0.3rem;
}

.excel-status-autocomplete-results {
  display: grid;
  gap: 2px;
  max-height: 220px;
  overflow: auto;
}

.excel-status-autocomplete-input {
  min-height: 24px;
}

.excel-status-autocomplete-option,
.excel-status-autocomplete-chip {
  display: inline-grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.35rem;
  min-height: 26px;
  border: 1px solid var(--status-border, #c8d7eb);
  background: #fff;
  color: #1f2937;
  font-size: 0.74rem;
  font-weight: 800;
}

.excel-status-autocomplete-option {
  width: 100%;
  padding: 3px 6px;
  border-left-width: 6px;
  border-left-color: var(--status-bg, #d7dee8);
  text-align: left;
  cursor: pointer;
}

.excel-status-autocomplete-option:hover,
.excel-status-autocomplete-option:focus {
  background: #f2f7ff;
  outline: none;
}

.excel-status-autocomplete-option.is-reset {
  border-left-color: #bfccd9;
}

.excel-status-autocomplete-swatch {
  width: 14px;
  height: 14px;
  border: 1px solid var(--status-border, #bfccd9);
  border-radius: 4px;
  background: var(--status-bg, #d7dee8);
}

.excel-status-autocomplete-selection {
  display: flex;
  flex-wrap: wrap;
  gap: 0.22rem;
}

.excel-status-autocomplete-chip {
  max-width: 100%;
  padding: 2px 6px;
  border-left-width: 6px;
  border-left-color: var(--status-bg, #d7dee8);
  cursor: pointer;
}

.excel-status-autocomplete-chip span:nth-child(2),
.excel-status-autocomplete-option span:nth-child(2) {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.excel-status-autocomplete-chip strong {
  font-size: 0.8rem;
  line-height: 1;
}

.excel-multiselect-options {
  display: grid;
  gap: 0.2rem;
  max-height: 180px;
  overflow: auto;
}

.excel-multiselect-option {
  display: flex;
  align-items: flex-start;
  gap: 0.42rem;
  padding: 2px 4px;
  font-size: 0.77rem;
  color: #2b2b2b;
}

.excel-multiselect-option input[type="checkbox"] {
  width: 13px;
  height: 13px;
  min-height: auto;
  margin: 1px 0 0;
  padding: 0;
  flex: 0 0 auto;
}

.excel-multiselect-empty {
  font-size: 0.75rem;
  color: #6b7280;
  padding: 2px 4px;
}

.partner-checkout-shell {
  display: grid;
  gap: 1.1rem;
}

.partner-checkout-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.partner-checkout-pill {
  display: inline-grid;
  gap: 0.2rem;
  min-width: 140px;
  padding: 0.9rem 1rem;
  border: 1px solid rgba(49, 94, 208, 0.18);
  border-radius: 18px;
  background: linear-gradient(
    180deg,
    rgba(244, 248, 255, 0.96),
    rgba(231, 239, 252, 0.95)
  );
  color: #1d3561;
  text-align: right;
}

.partner-checkout-pill span {
  color: #607389;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.partner-checkout-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
  gap: 1rem;
}

.partner-checkout-card {
  padding: 1.15rem;
  border: 1px solid #d7e2f2;
  border-radius: 22px;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.98),
    rgba(244, 248, 255, 0.94)
  );
  box-shadow: 0 12px 28px rgba(30, 58, 110, 0.08);
}

.partner-checkout-card h2 {
  margin: 0 0 0.9rem;
  color: #25467c;
  font-size: 1rem;
  font-weight: 800;
}

.partner-checkout-summary,
.partner-checkout-steps {
  display: grid;
  gap: 0.65rem;
}

.partner-checkout-summary__row,
.partner-checkout-step {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px dashed rgba(103, 129, 168, 0.28);
}

.partner-checkout-summary__row:last-child,
.partner-checkout-step:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.partner-checkout-summary__row span,
.partner-checkout-step span {
  color: #5d6e84;
}

.partner-checkout-step {
  flex-direction: column;
}

.partner-checkout-step strong {
  color: #20314c;
}

.partner-checkout-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.partner-checkout-action-note {
  color: #607389;
  font-size: 0.86rem;
}

@media (max-width: 900px) {
  .partner-checkout-hero {
    flex-direction: column;
  }

  .partner-checkout-pill {
    width: 100%;
    text-align: left;
  }

  .partner-checkout-grid {
    grid-template-columns: 1fr;
  }

  .crm-field-row {
    grid-template-columns: 1fr;
  }

  .crm-field-label {
    padding-top: 0;
  }

  .crm-footer-bar {
    flex-wrap: wrap;
  }
}

.excel-autocomplete .excel-multiselect-panel {
  position: absolute;
  top: calc(100% + 2px);
  left: 0;
  right: 0;
  z-index: 25;
  max-height: 220px;
  overflow: auto;
  box-shadow: 0 10px 24px rgba(18, 36, 66, 0.18);
}

.excel-filter-check {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 24px;
  font-size: 0.78rem;
  color: #fff;
}

.excel-filter-check input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  margin: 0;
  border: 1px solid #8f9fb6;
  background: #fff;
  border-radius: 2px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
  flex: 0 0 auto;
  position: relative;
}

.excel-filter-check input[type="checkbox"]:checked {
  background: #2f61d2;
  border-color: #234fae;
}

.excel-filter-check input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  left: 3px;
  top: 1px;
  width: 3px;
  height: 6px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.excel-filter-actions {
  display: grid;
  gap: 0.35rem;
  margin-top: 0.45rem;
}

.excel-action-btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 4px;
  background: linear-gradient(180deg, #0d2150 0%, #152d6b 100%);
  color: #fff;
  font-size: 0.77rem;
  font-weight: 700;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.excel-action-btn.secondary {
  background: rgba(245, 250, 255, 0.94);
  color: #142236;
  border: 1px solid rgba(188, 217, 241, 0.86);
  box-shadow: none;
}

.excel-action-btn.disabled {
  opacity: 0.55;
  pointer-events: none;
}

.excel-action-btn.dark {
  background: linear-gradient(180deg, #0d2150 0%, #152d6b 100%);
}

.excel-board {
  min-width: 0;
  background: #e8f2fd;
  overflow-y: auto;
  min-height: 0;
}

.excel-titlebar {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  padding: 10px 14px 6px;
  border-bottom: 1px solid #2d2d2d;
  background: #fff;
}

.excel-titlebar h1 {
  margin: 0;
  font-size: 1.18rem;
  line-height: 1.1;
  color: #111;
}

.excel-subtitle {
  margin-top: 0.2rem;
  font-size: 0.78rem;
  color: #53606f;
}

.excel-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.excel-chip {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: #edf2ff;
  color: #21469e;
  font-size: 0.72rem;
  font-weight: 700;
}

.excel-status-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 0.45rem;
  padding: 8px 12px;
  background: #fff;
  border-bottom: 1px solid #c6d2df;
}

.iconset-cell {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.excel-status-card {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.45rem 0.55rem;
  border: 1px solid #c9d3df;
  background: linear-gradient(180deg, #ffffff 0%, #f2f5f9 100%);
  border-radius: 6px;
  text-decoration: none;
}

.excel-status-name {
  font-size: 0.72rem;
  color: #5b6775;
  text-transform: uppercase;
}

.excel-status-value {
  font-size: 1rem;
  color: #0f1b2d;
}

.excel-grid-wrap {
  padding: 0;
}

.accounts-grid-wrap {
  padding: 12px;
  background: linear-gradient(180deg, #eaf5ff 0%, #dff0ff 100%);
}

.excel-board-comptes .excel-titlebar h1 {
  font-size: 1.55rem;
  letter-spacing: 0;
}

.accounts-grid-scroll {
  background: linear-gradient(180deg, #edf7ff 0%, #e1f1ff 100%);
  padding: 18px 16px 26px;
}

.accounts-partner-stack {
  display: grid;
  gap: 30px;
  min-width: 1120px;
}

.accounts-partner-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  background: #fff;
  border: 2px solid #7da6ca;
  box-shadow: 0 0 0 8px #d8ecff;
}

.accounts-partner-table th,
.accounts-partner-table td {
  border: 1px solid #86add0;
  color: #17304b;
  text-align: center;
  vertical-align: middle;
}

.accounts-side-head,
.accounts-partner-head {
  width: 150px;
}

.accounts-status-head {
  font-size: 0.82rem;
  font-weight: 800;
}

.accounts-partner-table thead th {
  position: sticky;
  top: 0;
  z-index: 3;
  height: 48px;
  padding: 8px;
  background: linear-gradient(180deg, #ffffff 0%, #eef6ff 100%);
  font-size: 0.74rem;
  font-weight: 800;
}

.accounts-partner-start-row > th,
.accounts-partner-start-row > td {
  border-top-width: 3px;
}

.accounts-side-cell,
.accounts-partner-cell {
  width: 150px;
  min-width: 150px;
  padding: 18px 10px;
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
  font-size: 0.78rem;
  vertical-align: middle !important;
}

.accounts-partner-cell {
  text-align: left;
}

.accounts-cell-content {
  display: grid;
  gap: 7px;
  justify-items: center;
}

.accounts-cell-content--partner {
  justify-items: start;
}

.accounts-metric-label {
  height: 46px;
  padding: 7px 8px;
  background: #f7fbff;
  font-size: 0.7rem;
  font-weight: 800;
  line-height: 1.18;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

.accounts-metric-value {
  height: 120px;
  padding: 12px 8px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  font-size: 0.82rem;
}

.accounts-metric-label.is-empty,
.accounts-metric-value.is-empty {
  background: #fbfdff;
}

.accounts-metric-value .excel-metric-value {
  font-size: 1.05rem;
}

.accounts-partner-table .account-board-metric-value-link {
  min-width: 0;
  min-height: 0;
  padding: 0;
  border-radius: 0;
  color: inherit;
}

.accounts-partner-table .account-board-metric-value-link:hover {
  transform: none;
  box-shadow: none;
  background: transparent;
  text-decoration: underline;
}

.accounts-partner-table .excel-meta {
  color: #4f6982;
}

.accounts-partner-table.account-total-row {
  box-shadow: 0 0 0 10px #ffe9a8;
}

.accounts-partner-table.account-total-row .accounts-side-cell,
.accounts-partner-table.account-total-row .accounts-partner-cell,
.accounts-partner-table .excel-account-total-label {
  background: linear-gradient(180deg, #fff8d9 0%, #ffe7a0 100%) !important;
  font-weight: 800;
}

.accounts-partner-table.account-total-row
  .accounts-metric-value.excel-account-total-cell {
  background: linear-gradient(180deg, #ffffff 0%, #f5fbff 100%) !important;
}

.accounts-board-grid {
  display: grid;
  gap: 12px;
}

.account-board-card {
  overflow: hidden;
  border: 1px solid #b8cee5;
  border-radius: 12px;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.98) 0%,
    rgba(244, 248, 253, 0.98) 100%
  );
  box-shadow: 0 10px 24px rgba(17, 39, 68, 0.08);
}

.account-board-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 12px 14px;
  border-bottom: 1px solid #d7e3f0;
  background: linear-gradient(180deg, #ffffff 0%, #eef4fb 100%);
}

.account-board-headline {
  min-width: 0;
}

.account-board-title {
  display: inline-block;
  max-width: 100%;
  font-size: 1rem;
  font-weight: 800;
  color: #17263a;
  text-decoration: none;
}

.account-board-title:hover {
  text-decoration: underline;
}

.account-board-code {
  margin-top: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #5a697a;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.account-board-status {
  flex: 0 0 auto;
  white-space: nowrap;
}

.account-board-metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  padding: 12px 14px 14px;
}

.account-board-metric {
  --account-metric-bg: rgba(255, 255, 255, 0.6);
  --account-metric-border: rgba(23, 38, 58, 0.08);
  --account-metric-color: #17263a;
  min-width: 0;
  min-height: 112px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 10px 8px;
  border: 1px solid var(--account-metric-border);
  border-radius: 10px;
  background: var(--account-metric-bg);
  color: var(--account-metric-color);
  text-align: center;
}

.account-board-metric-label {
  display: block;
  min-height: 2.8em;
  font-size: 0.7rem;
  font-weight: 800;
  line-height: 1.35;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: inherit;
  overflow-wrap: anywhere;
}

.account-board-metric .excel-metric-value {
  font-size: 1rem;
}

.account-board-metric-value-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.2rem;
  min-height: 2.2rem;
  padding: 0 0.45rem;
  border-radius: 999px;
  color: inherit;
  text-decoration: none;
  transition:
    transform 0.16s ease,
    box-shadow 0.16s ease,
    background 0.16s ease;
}

.account-board-metric-value-link:hover {
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(15, 23, 36, 0.12);
  background: rgba(255, 255, 255, 0.18);
}

.account-board-metric-value-link:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

.account-board-metric .excel-meta {
  margin-top: 0;
  color: inherit;
  opacity: 0.92;
}

.excel-grid tbody tr.is-suspended {
  background: linear-gradient(180deg, #eef2f6 0%, #e6ebf1 100%);
}

.excel-grid tbody tr.is-suspended td {
  color: #6e7887;
}

.excel-grid tbody tr.is-suspended .excel-client-link,
.excel-grid tbody tr.is-suspended .excel-meta,
.excel-grid tbody tr.is-suspended .excel-pill,
.excel-grid tbody tr.is-suspended .excel-tag-pill,
.excel-grid tbody tr.is-suspended .excel-badge-alert {
  opacity: 0.78;
}

.excel-grid tbody tr.is-agency-reminder {
  background: linear-gradient(180deg, #fff4d8 0%, #ffe7b1 100%);
}

.excel-grid tbody tr.is-agency-reminder td {
  color: #5b4100;
  border-bottom: 1px solid rgba(194, 145, 13, 0.35);
}

.excel-grid tbody tr.is-agency-reminder .excel-pill,
.excel-grid tbody tr.is-agency-reminder .excel-badge-alert,
.excel-grid tbody tr.is-agency-reminder .excel-client-link {
  font-weight: 800;
}

.dossier-lock-banner {
  font-weight: 600;
}

.excel-grid-scroll {
  overflow-x: auto;
  overflow-y: visible;
  max-width: 100%;
  background: #d8ebff;
}

.metric-card--link {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.metric-card--link:hover {
  text-decoration: none;
}

.metric-card--link:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.field-stack--full {
  grid-column: 1 / -1;
}

.status-color-chip {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 2px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  vertical-align: middle;
  margin-right: 0.35rem;
}

.color-picker-field {
  display: grid;
  gap: 0.65rem;
}

.color-picker-field--advanced {
  max-width: 100%;
}

.advanced-color-picker {
  display: grid;
  gap: 0.75rem;
  padding: 0.85rem;
  border: 1px solid #d7e2ef;
  border-radius: 16px;
  background: linear-gradient(180deg, #fbfdff 0%, #f1f7ff 100%);
}

.advanced-color-picker__summary {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.advanced-color-picker__sample {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.9);
  box-shadow:
    0 0 0 1px rgba(15, 23, 42, 0.12),
    0 8px 18px rgba(21, 42, 68, 0.14);
}

.advanced-color-picker__metrics {
  display: flex;
  gap: 1.15rem;
  flex-wrap: wrap;
  align-items: center;
  color: #1b2d44;
}

.advanced-color-picker__metrics strong {
  margin-right: 0.35rem;
  color: #66758a;
}

.advanced-color-picker__visual {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 56px;
  padding: 0.45rem 0.7rem;
  border: 1px solid #d0ddec;
  border-radius: 16px;
  background: #fff;
  color: #18314f;
  font-weight: 700;
  cursor: pointer;
}

.advanced-color-picker__native {
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.advanced-color-picker__native::-webkit-color-swatch-wrapper {
  padding: 0;
}

.advanced-color-picker__native::-webkit-color-swatch {
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-radius: 999px;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.12);
}

.color-palette {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(34px, 34px));
  gap: 0.48rem;
  align-items: center;
  padding: 0.7rem;
  border: 1px solid #d7e2ef;
  border-radius: 14px;
  background: linear-gradient(180deg, #fbfdff 0%, #f1f6fc 100%);
}

.advanced-color-picker__palette {
  grid-template-columns: repeat(auto-fill, minmax(38px, 38px));
  background: rgba(255, 255, 255, 0.56);
}

.color-swatch {
  width: 34px;
  height: 34px;
  border: 2px solid rgba(15, 23, 42, 0.18);
  border-radius: 10px;
  background: var(--swatch-color);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.45),
    0 6px 14px rgba(21, 42, 68, 0.12);
  cursor: pointer;
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease,
    border-color 0.15s ease;
}

.advanced-color-picker__palette .color-swatch {
  width: 38px;
  height: 38px;
  border-radius: 12px;
}

.color-swatch:hover,
.color-swatch:focus {
  transform: translateY(-1px);
  border-color: #244ca8;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.55),
    0 8px 18px rgba(36, 76, 168, 0.18);
  outline: none;
}

.color-swatch.is-selected {
  border-color: #143a7d;
  outline: 3px solid rgba(123, 178, 230, 0.6);
  outline-offset: 2px;
}

.color-picker-preview {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.color-picker-preview .status-color-chip {
  width: 18px;
  height: 18px;
  border-radius: 5px;
}

.template-variable-assistant {
  display: grid;
  gap: 0.55rem;
  padding: 0.8rem;
  border: 1px solid #d7e2ef;
  border-radius: 14px;
  background: linear-gradient(180deg, #fbfdff 0%, #f1f6fc 100%);
}

.template-variable-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.template-variable-chip {
  border: 1px solid #c6d6ea;
  border-radius: 999px;
  background: #ffffff;
  color: #1f3760;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0.4rem 0.75rem;
  cursor: pointer;
}

.template-variable-chip:hover,
.template-variable-chip:focus {
  border-color: #244ca8;
  background: #eef5ff;
  outline: none;
}

.template-variable-autocomplete {
  display: grid;
  gap: 0.15rem;
  margin-top: 0.45rem;
  padding: 0.35rem;
  border: 1px solid #c6d6ea;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 16px 30px rgba(24, 48, 86, 0.12);
}

.template-variable-autocomplete__item {
  padding: 0.5rem 0.65rem;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #1f3760;
  text-align: left;
  font-size: 0.82rem;
  cursor: pointer;
}

.template-variable-autocomplete__item:hover,
.template-variable-autocomplete__item:focus {
  background: #eef5ff;
  outline: none;
}

.excel-grid {
  min-width: 1480px;
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
}

.excel-grid thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 6px 8px;
  background: linear-gradient(180deg, #f4f4f4 0%, #d8d8d8 100%);
  border-bottom: 1px solid #b7c2cf;
  color: #2d2d2d;
  font-size: 0.75rem;
  font-weight: 700;
  text-align: left;
  white-space: nowrap;
}

.excel-grid tbody td {
  padding: 12px 14px;
  border-bottom: 1px solid #e2e8f0;
  color: #1e293b;
  font-size: 0.82rem;
  vertical-align: middle;
  transition: background 0.15s ease;
}

.excel-col-reference .excel-meta {
  max-width: 130px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.excel-metric-cell {
  min-width: 120px;
  text-align: center;
  background: rgba(255, 255, 255, 0.2);
}

.excel-metric-value {
  font-weight: 800;
  color: #1b3355;
}

.excel-col-agence {
  background: linear-gradient(180deg, #f4f4f4 0%, #dcdcdc 100%);
}

.excel-col-mpr-nouveau,
.excel-col-mpr-en-cours,
.excel-col-mpr-en-cours-de-depot,
.excel-col-mpr-en-instruction {
  background: #e8f1ff !important;
}

.excel-col-mpr-depose,
.excel-col-mpr-solde-depose {
  background: #9bd2db !important;
  color: #143944 !important;
}

.excel-col-mpr-octroye,
.excel-col-mpr-paye {
  background: #2f8fe6 !important;
  color: #fff !important;
}

.excel-col-mpr-travaux-realises {
  background: #ffed72 !important;
  color: #5f4900 !important;
}

.excel-col-mpr-controle {
  background: #f2c75d !important;
  color: #4a3600 !important;
}

.excel-col-mpr-refuse,
.excel-col-mpr-retrait-subvention,
.excel-col-financement-non-paye,
.excel-col-financement-litige {
  background: #eb4f5e !important;
  color: #fff !important;
}

.excel-col-mpr-contentieux {
  background: #b289de !important;
  color: #fff !important;
}

.excel-col-cee-non-conforme {
  background: #f5c437 !important;
  color: #463400 !important;
}

.excel-col-cee-a-verifier {
  background: #f1e3a7 !important;
  color: #564400 !important;
}

.excel-col-cee-conforme {
  background: #6ad44c !important;
  color: #0d3811 !important;
}

.excel-col-cee-envoye {
  background: #79b8f2 !important;
  color: #12395f !important;
}

.excel-col-cee-non-defini {
  background: #dadfe6 !important;
  color: #475464 !important;
}

.excel-col-financement-a-facturer {
  background: #e7eefb !important;
  color: #284365 !important;
}

.excel-col-financement-facture {
  background: #fedf77 !important;
  color: #5d4300 !important;
}

.excel-col-financement-paye {
  background: #5ac85d !important;
  color: #09310c !important;
}

.excel-col-financement-en-attente {
  background: #f5b64e !important;
  color: #553700 !important;
}

.excel-grid tbody tr {
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.excel-grid tbody tr:nth-child(2n) {
  background: #f8fafc;
}

.excel-grid tbody tr:hover {
  background: #eff6ff;
  box-shadow: inset 3px 0 0 #3b82f6;
}

@media (max-width: 1400px) {
  .account-board-metrics {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 1024px) {
  .account-board-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .account-board-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .account-board-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 480px) {
  .accounts-grid-wrap {
    padding: 8px;
  }

  .account-board-metrics {
    gap: 8px;
    padding: 10px;
  }

  .account-board-metric {
    min-height: 96px;
    padding: 8px 6px;
  }
}

.excel-client-link {
  font-weight: 700;
  color: #17263a;
}

.excel-meta {
  margin-top: 2px;
  font-size: 0.72rem;
  color: #42586d;
}

.excel-check {
  width: 15px;
  height: 15px;
}

.excel-grid tr.is-ai-selected td {
  animation: ai-selected-row 1.8s ease;
}

@keyframes ai-selected-row {
  0% {
    box-shadow: inset 4px 0 0 #1c83d6;
    background-color: rgba(28, 131, 214, 0.22);
  }
  100% {
    box-shadow: inset 0 0 0 transparent;
  }
}

.dashboard-context-menu {
  position: fixed;
  z-index: 9999;
  min-width: 220px;
  padding: 10px;
  border-radius: 10px;
  background: #0f1b2d;
  color: #fff;
  box-shadow: 0 18px 38px rgba(10, 18, 30, 0.28);
  display: none;
}

.dashboard-context-menu.is-open {
  display: block;
}

.dashboard-context-menu .context-title {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 8px;
}

.dashboard-context-menu .context-action {
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  color: #fff;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 0.85rem;
}

.dashboard-context-menu .context-action:hover {
  background: rgba(255, 255, 255, 0.12);
}

.dashboard-action-modal {
  position: fixed;
  inset: 0;
  background: rgba(7, 12, 20, 0.45);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10000;
}

.dashboard-action-modal.is-open {
  display: flex;
}

.dashboard-action-card {
  width: min(520px, 90vw);
  background: #fff;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 22px 50px rgba(10, 18, 30, 0.25);
}

.dashboard-action-card h3 {
  margin: 0 0 6px;
  font-size: 1.1rem;
}

.dashboard-action-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 12px;
}

.excel-pill {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 1px 9px;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 36, 0.06);
  background: #fdf3c7;
  color: #7a5a00;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.excel-grid .excel-pill {
  max-width: 100%;
  white-space: normal;
}

.excel-pill.controle-mpr-veritas,
.excel-pill.anomalie {
  background: #fde3e6;
  color: #b1303d;
  border-color: rgba(177, 48, 61, 0.16);
}

.excel-pill.csp-non-realise,
.excel-pill.absent-controle {
  background: #ece2fb;
  color: #5d3d9a;
  border-color: rgba(93, 61, 154, 0.16);
}

.excel-pill.dossier-incomplet,
.excel-pill.complement-demande {
  background: #fdeccb;
  color: #8f5b00;
  border-color: rgba(143, 91, 0, 0.16);
}

.excel-pill.en-attente-consentement,
.excel-pill.bon-a-deposer-a-verifier {
  background: #dff5e2;
  color: #1c7a45;
  border-color: rgba(28, 122, 69, 0.16);
}

.excel-badge-alert {
  display: inline-flex;
  align-items: center;
  min-height: 21px;
  padding: 0 7px;
  border-radius: 2px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
}

.excel-danger {
  background: #fde3e6;
  color: #b1303d;
}

.excel-warning {
  background: #fdeccb;
  color: #8f5b00;
}

.excel-success {
  background: #dff5e2;
  color: #1c7a45;
}

.excel-info {
  background: #e2ecff;
  color: #1f4db3;
}

.excel-primary {
  background: var(--primary-pale);
  color: var(--primary);
}

.d-none {
  display: none !important;
}

.dashboard-action-date-wrap {
  margin: 0 0 1rem;
}

.rappel-agenda-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

/* ── Panneaux Agenda (Glassmorphism & Modern UI) ── */
.rappel-agenda-panel {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 10px 40px -10px rgba(15, 23, 42, 0.08);
  border-radius: 20px;
  overflow: hidden;
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.rappel-agenda-panel:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 45px -10px rgba(15, 23, 42, 0.12);
}

.rappel-agenda-panel__header {
  background: linear-gradient(135deg, rgba(255,255,255,0.9), rgba(248,250,252,0.8));
  border-bottom: 1px solid rgba(226, 232, 240, 0.6);
  padding: 1.2rem 1.5rem;
}

/* ── Bouton "+ Nouvelle tâche" dans le header de l'agenda ─── */
.tache-create-btn {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  border: none;
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: #fff;
  font-size: .8rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(37, 99, 235, 0.25);
  transition: all 0.2s ease;
  white-space: nowrap;
}
.tache-create-btn:hover {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}

/* ── Label de section Mes tâches personnelles ─────────────── */
.tache-section-label {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
  margin-top: 1.5rem;
  margin-bottom: 0.8rem;
}

/* ── Liste des tâches ────────────────────────────────────── */
.tache-personnelle-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.8rem;
}

/* ── Carte tâche (To-Do List native app style) ───────────── */
.tache-personnelle-item {
  padding: 1rem 1.2rem;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  display: grid;
  gap: 0.4rem;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}
.tache-personnelle-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: #cbd5e1;
  border-radius: 4px 0 0 4px;
  transition: background 0.2s;
}
.tache-personnelle-item:hover {
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
  transform: translateY(-1px);
  border-color: #cbd5e1;
}
.tache-personnelle-item--haute::before { background: #f59e0b; }
.tache-personnelle-item--haute {
  background: linear-gradient(to right, #fffbeb, #ffffff);
}
.tache-personnelle-item--urgente::before { background: #ef4444; }
.tache-personnelle-item--urgente {
  background: linear-gradient(to right, #fef2f2, #ffffff);
}
.tache-personnelle-item.is-overdue::before { background: #dc2626; }
.tache-personnelle-item.is-overdue {
  border-color: #fca5a5;
  background: linear-gradient(to right, #fef2f2, #fff5f5);
}
.tache-personnelle-item.is-today::before { background: #3b82f6; }
.tache-personnelle-item.is-today {
  border-color: #bfdbfe;
  background: linear-gradient(to right, #eff6ff, #ffffff);
}

/* ── En-tête badge + date ────────────────────────────────── */
.tache-personnelle-top {
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-wrap: wrap;
}

/* ── Badge priorité ──────────────────────────────────────── */
.tache-priorite-badge {
  display: inline-flex;
  align-items: center;
  padding: 1px 7px;
  border-radius: 999px;
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.tache-priorite-badge--normale { background: #e8f0fe; color: #2356c4; }
.tache-priorite-badge--haute   { background: #fef3c7; color: #92610a; }
.tache-priorite-badge--urgente { background: #fee2e2; color: #b91c1c; }

/* ── Échéance ────────────────────────────────────────────── */
.tache-echeance {
  font-size: .72rem;
  color: #5b7496;
  margin-left: auto;
}
.tache-echeance--overdue {
  color: #c0392b;
  font-weight: 600;
}
.tache-recurrence-icon {
  font-size: .8rem;
  opacity: .7;
  cursor: help;
}

/* ── Texte ───────────────────────────────────────────────── */
.tache-personnelle-titre {
  margin: 0;
  font-size: .88rem;
  font-weight: 600;
  color: #17263a;
  line-height: 1.3;
}
.tache-personnelle-desc {
  margin: 0;
  font-size: .75rem;
  color: #60748e;
  line-height: 1.4;
}

/* ── Actions (Fait / Supprimer) ──────────────────────────── */
.tache-personnelle-actions {
  display: flex;
  gap: .5rem;
  margin-top: .3rem;
}
.tache-action-btn {
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid;
  font-size: .72rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .12s, transform .1s;
}
.tache-action-btn:hover { transform: translateY(-1px); }
.tache-action-btn--done {
  background: #dff5e2;
  border-color: #a8d9b2;
  color: #1a6b2e;
}
.tache-action-btn--done:hover { background: #c5edcc; }
.tache-action-btn--delete {
  background: #fff0f0;
  border-color: #f0b8b8;
  color: #b91c1c;
}
.tache-action-btn--delete:hover { background: #fddada; }

/* ── État vide ───────────────────────────────────────────── */
.tache-empty-state {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .75rem 1rem;
  font-size: .82rem;
  color: #7a92aa;
  border: 1px dashed #c7d8e8;
  border-radius: 10px;
  background: rgba(245,250,255,.7);
}

/* ── Modal overlay ────────────────────────────────────────── */
.tache-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(8,15,28,.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 12000;
  backdrop-filter: blur(2px);
}
.tache-modal-overlay[hidden] { display: none; }

.tache-modal-card {
  width: min(520px, 94vw);
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 28px 60px rgba(8,16,32,.22);
  overflow: hidden;
  animation: tache-modal-in .2s ease;
}
@keyframes tache-modal-in {
  from { opacity: 0; transform: scale(.94) translateY(12px); }
  to   { opacity: 1; transform: none; }
}

.tache-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 1.3rem .8rem;
  border-bottom: 1px solid #eaeff5;
  background: linear-gradient(135deg, #f0f6ff 0%, #eaf2ff 100%);
}
.tache-modal-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: #17263a;
}
.tache-modal-close {
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  border: 0;
  background: rgba(23,38,58,.08);
  color: #4a6380;
  font-size: 1.2rem;
  cursor: pointer;
  transition: background .12s;
}
.tache-modal-close:hover { background: rgba(23,38,58,.18); }

.tache-modal-form { padding: 1.1rem 1.3rem 1.3rem; }

.tache-modal-field { margin-bottom: .85rem; }
.tache-modal-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .75rem;
  margin-bottom: .85rem;
}
.tache-modal-label {
  display: block;
  font-size: .78rem;
  font-weight: 600;
  color: #4a5e72;
  margin-bottom: .3rem;
}
.tache-required { color: #c0392b; }
.tache-modal-input {
  width: 100%;
  padding: .48rem .7rem;
  border-radius: 8px;
  border: 1px solid #c8d8e8;
  font-size: .88rem;
  background: #fafcff;
  transition: border-color .15s, box-shadow .15s;
  box-sizing: border-box;
}
.tache-modal-input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59,130,246,.15);
}
.tache-modal-textarea { min-height: 72px; resize: vertical; }

.tache-modal-error {
  margin: .5rem 0 .75rem;
  padding: .5rem .75rem;
  border-radius: 8px;
  background: #fdecea;
  color: #c0392b;
  font-size: .8rem;
  font-weight: 600;
}

.tache-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: .6rem;
  margin-top: .25rem;
}



.payment-reminder-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: linear-gradient(135deg, #fff7eb 0%, #fff1dd 100%);
}

.payment-reminder-banner__copy {
  display: grid;
  gap: 0.45rem;
}

.payment-reminder-banner__eyebrow {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #9a5b16;
}

.payment-reminder-banner h2 {
  margin: 0;
  font-size: 1.02rem;
  color: #2b2f38;
}

.payment-reminder-banner p {
  margin: 0;
  color: #5b6470;
}

.payment-reminder-banner__meta,
.payment-reminder-banner__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
}

.rappel-agenda-panel .excel-panel-body {
  display: grid;
  gap: 0.75rem;
}

/* Panneau "Agenda du jour" : plus visible */
.rappel-agenda-panel--today {
  border: 2px solid #4a90d9;
  box-shadow: 0 4px 18px rgba(36, 98, 196, 0.14);
}

.rappel-agenda-panel--today .excel-panel-header {
  background: linear-gradient(135deg, #1a4fa3 0%, #2e73d0 100%);
  color: #fff;
  border-radius: 14px 14px 0 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.9rem 1.2rem;
}

.rappel-agenda-panel--today .excel-panel-header h2 {
  color: #fff;
  margin: 0;
}

.rappel-agenda-panel__icon {
  color: #fff;
  flex-shrink: 0;
}

/* Sous-labels "Mes tâches" / "Rappels équipe" */
.rappel-agenda-section-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #4a6896;
  padding: 0.25rem 0.25rem 0;
  border-top: 1px solid #e2ecf8;
  margin-top: 0.25rem;
}

.rappel-agenda-section-label:first-child {
  border-top: none;
  margin-top: 0;
}

.rappel-agenda-item {
  display: grid;
  gap: 0.2rem;
  padding: 0.85rem 1rem;
  border: 1px solid #d9e2ef;
  border-radius: 14px;
  background: #f8fbff;
  color: inherit;
}

/* Mes propres rappels : légère teinte */
.rappel-agenda-item--mine {
  background: linear-gradient(180deg, #f0f6ff 0%, #e8f0ff 100%);
  border-color: #b9d0f5;
}

.rappel-agenda-item.is-overdue {
  border-color: #f0b8b8;
  background: #fff7f7;
}

.rappel-agenda-item strong {
  color: #244ca8;
}

.rappel-agenda-item small {
  color: var(--muted);
}

.rappel-focus-stack {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.rappel-focus-card {
  padding: 1.1rem 1.2rem;
  border-radius: 20px;
  border: 1px solid #d7e4f4;
  background: linear-gradient(180deg, #ffffff 0%, #f5f9ff 100%);
  box-shadow: 0 16px 28px rgba(36, 58, 89, 0.08);
}

.rappel-focus-card.is-today {
  border-color: #b9d7f5;
}

.rappel-focus-card.is-overdue {
  border-color: #efbcbc;
  background: linear-gradient(180deg, #fffdfd 0%, #fff4f4 100%);
}

.rappel-focus-card h2 {
  margin: 0.15rem 0 0.9rem;
  font-size: 1.1rem;
  color: #244ca8;
}

.rappel-focus-item {
  display: grid;
  grid-template-columns: 84px 1fr;
  gap: 0.75rem;
  padding: 0.55rem 0;
  border-top: 1px dashed #d6deea;
}

.rappel-focus-item:first-of-type {
  border-top: 0;
}

.rappel-entry.is-today {
  border-color: #b9d7f5;
  background: #f7fbff;
}

.rappel-entry.is-overdue {
  border-color: #efbcbc;
  background: #fff7f7;
}

.conversation-panel {
  display: grid;
  gap: 1rem;
}

.csp-schedule-card {
  display: grid;
  gap: 0.85rem;
  padding: 1.1rem 1.2rem;
  border: 1px solid #2f6fd1;
  border-left: 6px solid #2f6fd1;
  border-radius: 20px;
  background: linear-gradient(180deg, #dbe9fb 0%, #b9d3f3 100%);
  box-shadow: 0 18px 36px rgba(24, 46, 78, 0.18);
}

.csp-schedule-card__eyebrow {
  display: inline-block;
  align-self: start;
  padding: 0.2rem 0.6rem;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #ffffff;
  background: #2f6fd1;
  border-radius: 999px;
}

.csp-schedule-card__title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f2747;
}

.csp-schedule-card__values {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.csp-schedule-pill {
  min-width: 180px;
  display: grid;
  gap: 0.2rem;
  padding: 0.85rem 1rem;
  border: 1px solid #d1ddeb;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.csp-schedule-pill__label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #60748e;
}

.csp-schedule-pill strong {
  font-size: 1.05rem;
  color: #14263d;
}

.csp-schedule-card__empty {
  padding: 0.9rem 1rem;
  border: 1px dashed #c7d5e4;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
  color: #5f7188;
}

.csp-edit-details {
  border-top: 1px solid rgba(47, 111, 209, 0.25);
  padding-top: 0.6rem;
  margin-top: 0.2rem;
}
.csp-edit-summary {
  font-size: 0.78rem;
  font-weight: 600;
  color: #2f6fd1;
  cursor: pointer;
  user-select: none;
  list-style: none;
}
.csp-edit-summary::-webkit-details-marker { display: none; }
.csp-edit-summary::before { content: "✎ "; }
.csp-edit-form {
  margin-top: 0.75rem;
}
.csp-edit-fields {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}
.csp-edit-fields .field-stack {
  flex: 1;
  min-width: 140px;
}

.conversation-thread {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding: 1rem;
  border: 1px solid #d9e3ef;
  border-radius: 20px;
  background: linear-gradient(180deg, #f8fbff 0%, #f3f7fc 100%);
  max-height: 420px;
  overflow-y: auto;
}

.conversation-thread--internal {
  background: linear-gradient(180deg, #fbfcfe 0%, #f5f7fb 100%);
}

.conversation-message {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  max-width: 78%;
}

.conversation-message.is-self {
  align-self: flex-end;
}

.conversation-message.is-other {
  align-self: flex-start;
}

.conversation-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.72rem;
  color: #5c7088;
}

.conversation-message.is-self .conversation-meta {
  justify-content: flex-end;
}

.conversation-author {
  font-weight: 700;
  color: #27496d;
}

.conversation-bubble {
  padding: 0.9rem 1rem;
  border-radius: 18px 18px 18px 6px;
  background: #ffffff;
  border: 1px solid #d4deea;
  box-shadow: 0 12px 24px rgba(25, 48, 79, 0.08);
  color: #17263a;
  line-height: 1.45;
  word-break: break-word;
}

.conversation-message.is-self .conversation-bubble {
  border-radius: 18px 18px 6px 18px;
  background: linear-gradient(180deg, #dff3e7 0%, #d0ebdc 100%);
  border-color: #b2dcc0;
}

.conversation-thread--internal
  .conversation-message.is-self
  .conversation-bubble {
  background: linear-gradient(180deg, #edf2ff 0%, #dfe8ff 100%);
  border-color: #c7d6fb;
}

.conversation-empty {
  padding: 1rem;
  border: 1px dashed #c9d5e3;
  border-radius: 16px;
  text-align: center;
  color: #607389;
  background: rgba(255, 255, 255, 0.7);
}

.conversation-composer {
  padding: 1rem;
  border: 1px solid #d7e3ef;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 14px 28px rgba(21, 42, 68, 0.06);
}

.conversation-composer--neutral {
  background: #f9fbff;
}

.conversation-composer-title {
  margin-bottom: 0.75rem;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #5b6f88;
}

.conversation-composer textarea {
  min-height: 110px;
  border-radius: 16px;
  border: 1px solid #d4dfec;
  resize: vertical;
}

.conversation-composer-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 0.8rem;
}

.is-rappel-today {
  background: rgba(168, 200, 255, 0.18);
}

.is-rappel-overdue {
  background: rgba(239, 89, 104, 0.08);
}

@media (max-width: 1023px) {
  .csp-schedule-pill {
    min-width: 0;
    width: 100%;
  }

  .account-creation-hero {
    grid-template-columns: 1fr;
  }

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

  .account-role-panel__header,
  .account-edit-spotlight__header {
    flex-direction: column;
  }

  .account-role-panel__stats,
  .account-edit-spotlight__meta {
    justify-content: flex-start;
  }

  .dashboard-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
  }

  .grid-2,
  .grid-3,
  .stats-grid,
  .dashboard-layout,
  .rappel-agenda-grid,
  .rappel-focus-stack,
  .split-workbench,
  .document-action-strip {
    grid-template-columns: 1fr;
  }

  .split-workbench-sidebar {
    position: static;
  }

  .conversation-message {
    max-width: 100%;
  }

  .excel-shell {
    grid-template-columns: 1fr;
    height: auto;
    overflow: visible;
  }

  .excel-top-search-strip {
    padding-left: 6px;
    padding-right: 6px;
  }

  .excel-top-search-input {
    min-height: 46px;
    font-size: 0.95rem;
  }

  .container {
    width: 100%;
  }

  .excel-window {
    width: 100%;
  }

  .excel-sidebar {
    border-right: 0;
    border-bottom: 1px solid #b9c3cf;
    overflow: visible;
  }

  .excel-board {
    overflow: visible;
  }
}

/* Item 11+: badges onglets + installations entête */
.dossier-hero-installations {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-top: 6px;
}
.dossier-hero-installations__label {
  font-size: 0.9rem;
  color: #1d3a6d;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.dossier-hero-installations__chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #d4e5fb;
  color: #0b2a5b;
  border: 1px solid #6ea4e0;
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 0.9rem;
  font-weight: 700;
  box-shadow: 0 1px 2px rgba(13, 42, 91, 0.08);
}
.dossier-hero-installations__chip::before {
  content: "⚡";
  font-size: 0.85rem;
}
.tab-badge {
  display: inline-block;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  margin-left: 6px;
  background: #dc3545;
  color: #fff;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
  vertical-align: middle;
}
.dossier-list-unread-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  margin-left: 4px;
  background: #dc3545;
  color: #fff;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}

/* ===== Searchable select (ss-*) ===== */
.ss-wrapper {
  position: relative;
}
.ss-input {
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23344054' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 5px center;
  background-size: 12px 9px;
  padding-right: 1.4rem;
  width: 100%;
}
.ss-input:focus {
  cursor: text;
}
.ss-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 1050;
  background: #fff;
  border: 1px solid rgba(188, 217, 241, 0.9);
  border-top: none;
  border-radius: 0 0 3px 3px;
  max-height: 200px;
  overflow-y: auto;
  margin: 0;
  padding: 0;
  list-style: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
.ss-dropdown.ss-open {
  display: block;
}
.ss-dropdown li {
  padding: 4px 8px;
  cursor: pointer;
  font-size: 0.78rem;
  color: #142236;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ss-dropdown li:hover,
.ss-dropdown li.ss-focused {
  background: #e8f1fb;
}
.ss-dropdown li.ss-selected {
  font-weight: 600;
  color: #2563eb;
}
.ss-dropdown li.ss-empty {
  color: #9ca3af;
  font-style: italic;
  cursor: default;
}

/* ─── Champs client — grille de configuration ─────────────────────── */
.champs-client-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 0.5rem;
}

/* Liste triable de champs par type (admin types-dossiers) */
.champs-client-sortable {
  display: flex;
  flex-direction: column;
  gap: 5px;
  max-height: 440px;
  overflow-y: auto;
  padding: 4px 2px;
}

.champ-sort-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 12px;
  background: #fff;
  border: 1px solid #dde3f0;
  border-radius: 7px;
  cursor: default;
  transition: background 0.12s, border-color 0.12s;
  user-select: none;
}

.champ-sort-item--checked {
  background: #eff6ff;
  border-color: #93c5fd;
}

.champ-sort-item--ghost {
  opacity: 0.35;
  background: #e8f0ff;
}

.champ-sort-handle {
  cursor: grab;
  color: #9ba8c0;
  font-size: 1.15rem;
  line-height: 1;
  flex-shrink: 0;
  padding: 0 2px;
}

.champ-sort-handle:active {
  cursor: grabbing;
}

.champ-sort-item input[type="checkbox"] {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.champ-sort-item .champ-client-label {
  flex: 1;
  font-size: 0.875rem;
  font-weight: 500;
  color: #1e293b;
  cursor: pointer;
}

/* ── Grille globale filtrée par type sélectionné ───────── */
.champs-table-wrap.grid-type-filtered .champ-preview-card {
  transition: opacity 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.champs-table-wrap.grid-type-filtered .champ-preview-card.is-out-type {
  opacity: 0.28;
  filter: grayscale(0.5);
}
.champs-table-wrap.grid-type-filtered .champ-preview-card.is-in-type {
  border-color: #3b5fc0;
  box-shadow: 0 0 0 2px rgba(59,95,192,0.15);
}

/* ── Carte type active ──────────────────────────────────── */
.dtype-card {
  cursor: default;
  transition: border-color 0.18s, box-shadow 0.18s;
}
.dtype-card__body-click {
  cursor: pointer;
  padding: 0;
}
.dtype-card--active {
  border-color: #3b5fc0 !important;
  box-shadow: 0 0 0 3px rgba(59,95,192,0.18) !important;
}
.dtype-card--active .dtype-card__header {
  background: #eff3ff;
}

/* ── Panneau champs par type ────────────────────────────── */
#type-champs-panel .dt-form-divider {
  font-size: .8rem;
  font-weight: 600;
  color: #6b7a99;
  letter-spacing: .04em;
  text-transform: uppercase;
  border-bottom: 1px solid #e3e8f5;
  padding-bottom: 5px;
  margin-bottom: 8px;
}
.champs-client-sortable--available .champ-sort-item {
  opacity: .72;
  background: #fafbff;
  border-style: dashed;
}
.champs-client-sortable--available .champ-sort-item:hover {
  opacity: 1;
  border-style: solid;
  border-color: #93c5fd;
}
.champ-sort-handle--disabled {
  visibility: hidden;
  pointer-events: none;
  width: 14px;
}

/* Bouton ajouter/retirer dans le panneau type */
.champ-type-action-btn {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  border: 1px solid currentColor;
  background: transparent;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  transition: background .14s, color .14s;
}
.champ-type-remove {
  color: #e05252;
}
.champ-type-remove:hover {
  background: #fee2e2;
}
.champ-type-add {
  color: #2d9a5f;
}
.champ-type-add:hover {
  background: #d1fae5;
}


.champ-client-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.65rem;
  border-radius: 6px;
  background: var(--bg-alt, #f4f6f9);
  border: 1px solid transparent;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.champ-client-item:has(input:checked) {
  background: #eff6ff;
  border-color: #93c5fd;
}
.champ-client-item--readonly {
  cursor: default;
}
.champ-client-item input[type="checkbox"] {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  cursor: pointer;
}
.champ-client-label {
  flex: 1;
  font-size: 0.85rem;
  font-weight: 500;
  color: #1e293b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Badges de type de champ */
.champ-type-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}
.champ-type--text     { background: #e2e8f0; color: #475569; }
.champ-type--email    { background: #dbeafe; color: #1d4ed8; }
.champ-type--number   { background: #fef3c7; color: #92400e; }
.champ-type--date     { background: #d1fae5; color: #065f46; }
.champ-type--datetime { background: #ccfbf1; color: #134e4a; }
.champ-type--textarea { background: #f3e8ff; color: #6b21a8; }
.champ-type--select   { background: #ffe4e6; color: #9f1239; }
.champ-type--checkbox { background: #fef9c3; color: #713f12; }
.champ-type--installation { background: #e0f2fe; color: #0c4a6e; }

/* ═══════════════════════════════════════════════════════════════════
   superadmin — Types de dossiers — design système
   ═══════════════════════════════════════════════════════════════════ */

/* ── Panel header avec compteur ─────────────────────────────────── */
.dt-panel-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.dt-badge-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(255,255,255,0.18);
  color: rgba(220,235,255,0.9);
  font-size: 0.72rem;
  font-weight: 700;
}

/* ── Section toggles (pill-checkboxes) ──────────────────────────── */
.section-toggle-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.5rem;
}
.section-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.32rem 0.85rem 0.32rem 0.6rem;
  border-radius: 999px;
  border: 1.5px solid #c9d5e8;
  background: #f0f4fb;
  color: #4a5f7e;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s, color 0.12s, box-shadow 0.12s;
  user-select: none;
}
.section-toggle input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}
.section-toggle:has(input:checked) {
  background: #1e3a8a;
  border-color: #1e3a8a;
  color: #fff;
  box-shadow: 0 2px 8px rgba(30,58,138,0.22);
}
.section-toggle__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.4;
  flex-shrink: 0;
  transition: opacity 0.12s, transform 0.12s;
}
.section-toggle:has(input:checked) .section-toggle__dot {
  opacity: 1;
  transform: scale(1.2);
}

/* ── Diviseur visuel dans les formulaires ───────────────────────── */
.dt-form-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1.25rem 0 0.6rem;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #7a8fa8;
}
.dt-form-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #e1e8f2;
}

/* ── Cards de types de dossiers ─────────────────────────────────── */
.dtype-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
  padding: 18px 18px 0;
}
.dtype-card {
  border: 1.5px solid #d4dbe8;
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
  transition: box-shadow 0.15s, border-color 0.15s, transform 0.1s;
}
.dtype-card:hover {
  box-shadow: 0 6px 24px rgba(25,50,90,0.1);
  border-color: #b0bfda;
  transform: translateY(-1px);
}
.dtype-card--default {
  border-color: #3b82f6;
  background: linear-gradient(160deg, #eff6ff 0%, #fff 55%);
}
.dtype-card__header {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 14px 14px 10px;
  border-bottom: 1px solid #edf0f6;
}
.dtype-card--default .dtype-card__header {
  border-bottom-color: #dbeafe;
}
.dtype-card__icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: #e8f0fe;
  color: #2d56a7;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.dtype-card__icon .ui-icon { width: 18px; height: 18px; }
.dtype-card--default .dtype-card__icon {
  background: #dbeafe;
  color: #1d4ed8;
}
.dtype-card__meta {
  flex: 1;
  min-width: 0;
}
.dtype-card__name {
  font-weight: 700;
  font-size: 0.96rem;
  color: #1e3a6e;
  line-height: 1.2;
}
.dtype-card__code {
  font-size: 0.76rem;
  color: #8499b4;
  margin-top: 2px;
  font-family: "SFMono-Regular", Consolas, monospace;
}
.dtype-card__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  padding: 0 14px;
}
.dtype-card__sections {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding: 8px 14px 10px;
  min-height: 38px;
}
.dtype-card__footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  padding: 10px 14px;
  border-top: 1px solid #edf0f6;
  background: #f8fafc;
}
.dtype-card__desc {
  padding: 6px 14px 0;
  font-size: 0.81rem;
  color: #5f7282;
  line-height: 1.45;
}
.dtype-section-chip {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  background: #e8f0fe;
  color: #2d56a7;
  border: 1px solid #c7d9f7;
}

/* ── Zone de création de type ───────────────────────────────────── */
.dt-create-zone {
  margin: 18px 18px 0;
  padding: 18px;
  border: 1.5px dashed #c9d5e8;
  border-radius: 14px;
  background: #f8fbff;
}
.dt-create-zone__title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  font-size: 0.88rem;
  font-weight: 700;
  color: #2d56a7;
}
.dt-create-zone__title .ui-icon { width: 16px; height: 16px; }
.dt-create-zone .form-sheet {
  border-color: #d4dbe8;
  background: #fff;
}

/* ── Détails collapsibles (création champ) ──────────────────────── */
.dt-create-champ-details {
  border: 1.5px solid #d4dbe8;
  border-radius: 12px;
  overflow: hidden;
}
.dt-create-champ-details[open] {
  border-color: #3b82f6;
}
.dt-create-champ-summary {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 12px 16px;
  background: #f0f4fb;
  color: #2d56a7;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
  user-select: none;
  transition: background 0.12s;
}
.dt-create-champ-summary:hover { background: #e4ecf7; }
.dt-create-champ-details[open] .dt-create-champ-summary {
  background: #dbeafe;
  color: #1d4ed8;
  border-bottom: 1px solid #bfdbfe;
}
.dt-create-champ-summary::-webkit-details-marker { display: none; }
.dt-create-champ-summary .ui-icon { width: 16px; height: 16px; }
.dt-create-champ-details .form-sheet { margin: 16px; }

/* ── Lignes de champs (remplace table) ──────────────────────────── */
.champs-table-wrap {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid #e1e8f2;
  border-radius: 12px;
  overflow: hidden;
}
.champ-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 11px 16px;
  border-bottom: 1px solid #eef2f8;
  background: #fff;
  transition: background 0.1s;
}
.champ-row:last-child { border-bottom: none; }
.champ-row:hover { background: #f8fafc; }
.champ-row--inactive {
  opacity: 0.55;
}
.champ-row__info {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex: 1;
  min-width: 0;
}
.champ-row__texts {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.champ-row__label {
  font-size: 0.88rem;
  font-weight: 600;
  color: #1e293b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.champ-row__code {
  font-size: 0.73rem;
  color: #8499b4;
  font-family: "SFMono-Regular", Consolas, monospace;
}
.champ-options-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  flex-shrink: 0;
}
.champ-option-pill {
  display: inline-flex;
  align-items: center;
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 600;
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
}
.champ-option-more {
  display: inline-flex;
  align-items: center;
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  background: #e2e8f0;
  color: #64748b;
}
.champ-row__meta {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
}
.champ-row__actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
}
.champ-drag-handle {
  display: flex;
  align-items: center;
  padding: 0 4px;
  color: #cbd5e1;
  cursor: grab;
  flex-shrink: 0;
  touch-action: none;
  transition: color .15s;
}
.champ-drag-handle:hover { color: #64748b; }
.champ-drag-handle:active { cursor: grabbing; }

/* ── Preview grille champs (superadmin) ─────────────────────── */
.champs-table-wrap {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 14px;
}
.champ-preview-card {
  background: #fff;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  padding: 10px 12px 10px;
  transition: border-color .15s, box-shadow .15s;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.champ-preview-card:hover {
  border-color: #93c5fd;
  box-shadow: 0 0 0 3px rgba(147,197,253,.18);
}
.champ-preview-card--half { grid-column: span 4; }
.champ-preview-card--full { grid-column: 1 / -1; }
.champ-preview-card--inactive { opacity: 0.45; }
/* Wide mode: 2 par ligne */
.champs-table-wrap--wide .champ-preview-card--half { grid-column: span 6; }
.champ-preview-card--dragging {
  opacity: 0.8;
  box-shadow: 0 6px 20px rgba(14,165,233,.2);
  border-color: #7dd3fc;
}
.champ-preview-card__header {
  display: flex;
  align-items: center;
  gap: 6px;
}
.champ-preview-card__label {
  flex: 1;
  font-size: 0.78rem;
  font-weight: 600;
  color: #374151;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.champ-preview-card__actions {
  display: flex;
  align-items: center;
  gap: 4px;
  opacity: 0;
  transition: opacity .15s;
}
.champ-preview-card:hover .champ-preview-card__actions { opacity: 1; }
/* Usage checkboxes (Fiche client / Filtres Colonnes) */
.champ-usage-form {
  display: flex;
  gap: 12px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}
.champ-usage-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: .75rem;
  font-weight: 500;
  color: #475569;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}
.champ-usage-checkbox {
  width: 14px;
  height: 14px;
  accent-color: var(--primary, #1d4ed8);
  cursor: pointer;
}
.btn-xs {
  font-size: .72rem;
  padding: 2px 8px;
  line-height: 1.4;
}
/* Fake inputs */
.champ-preview-input {
  width: 100%;
  min-height: 30px;
  background: #f8fafc;
  border: 1px solid #e9edf4;
  border-radius: 5px;
  display: flex;
  align-items: center;
  padding: 4px 10px;
  font-size: 0.78rem;
  color: #cbd5e1;
  font-style: italic;
}
.champ-preview-input--textarea {
  min-height: 58px;
  align-items: flex-start;
  padding-top: 7px;
}
.champ-preview-input--checkbox,
.champ-preview-input--installation {
  background: transparent;
  border: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  font-style: normal;
  align-items: center;
}
.champ-preview-check {
  font-size: 0.75rem;
  color: #64748b;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 5px;
  padding: 2px 8px;
}
.champ-preview-check--more {
  background: #e2e8f0;
  color: #64748b;
  font-weight: 600;
}
.champ-preview-input--select {
  justify-content: space-between;
  color: #64748b;
  font-style: normal;
  cursor: default;
}
.champ-preview-input--date {
  justify-content: space-between;
  color: #94a3b8;
  cursor: default;
}

/* Section champs désactivés */
.champs-inactive-details {
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  overflow: hidden;
}
.champs-inactive-summary {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #94a3b8;
  cursor: pointer;
  user-select: none;
  list-style: none;
  background: #f8fafc;
}
.champs-inactive-summary::-webkit-details-marker { display: none; }
.champs-inactive-details[open] .champs-inactive-summary {
  border-bottom: 1.5px solid #e2e8f0;
}
.champs-inactive-list {
  padding: 6px 0;
}
.champ-inactive-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border-bottom: 1px solid #f1f5f9;
}
.champ-inactive-row:last-child { border-bottom: none; }
.champ-inactive-row__label {
  flex: 1;
  font-size: 0.82rem;
  color: #64748b;
}
.champ-inactive-row__code {
  font-size: 0.72rem;
  color: #94a3b8;
  background: #f1f5f9;
  padding: 1px 5px;
  border-radius: 4px;
}
.champ-inactive-row__actions {
  display: flex;
  gap: 6px;
}

/* Barre toggle densité */
.champs-density-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  margin-bottom: 10px;
}
.champs-density-bar__label {
  font-size: 0.73rem;
  color: #94a3b8;
  margin-right: 2px;
}
.champs-density-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: 1.5px solid #e2e8f0;
  border-radius: 6px;
  background: #fff;
  color: #94a3b8;
  cursor: pointer;
  transition: border-color .15s, color .15s, background .15s;
  padding: 0;
}
.champs-density-btn:hover {
  border-color: #93c5fd;
  color: #3b82f6;
}
.champs-density-btn.is-active {
  border-color: #3b82f6;
  background: #eff6ff;
  color: #2563eb;
}

@media (max-width: 640px) {
  .champs-table-wrap { grid-template-columns: 1fr; }
  .champ-preview-card--half,
  .champ-preview-card--full { grid-column: 1 / -1; }
}

/* ── État vide  ─────────────────────────────────────────────────── */
.dt-section .excel-panel-body .text-muted.text-center {
  padding: 2.5rem 1rem;
}

@media (max-width: 640px) {
  .dtype-cards { grid-template-columns: 1fr; padding: 12px; }
  .dt-create-zone { margin: 12px; padding: 14px; }
  .champ-row { flex-wrap: wrap; }
  .champ-options-preview { display: none; }
}

/* ── Type-switcher onglet Client (sous-menu par type de dossier) ─ */
.client-type-switcher {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  padding: 0.6rem 0.8rem;
  margin-bottom: 1rem;
  background: #f0f5ff;
  border: 1px solid #c7d8f5;
  border-radius: 12px;
}

.client-type-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: #4a6080;
  margin-right: 0.25rem;
}

.client-type-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.3rem 0.85rem;
  border: 1.5px solid #bdd0ef;
  border-radius: 999px;
  background: #fff;
  color: #2d4470;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
  white-space: nowrap;
}

.client-type-btn:hover {
  background: #dde6f7;
  border-color: #7ba4e0;
}

.client-type-btn.active {
  background: linear-gradient(135deg, #1e40af 0%, #2563eb 100%);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 2px 6px rgba(30, 64, 175, 0.25);
}

/* ── Dropdown bouton Modifier (hero dossier, multi-types) ─────── */
.hero-dropdown {
  position: relative;
}

.hero-dropdown > summary {
  list-style: none;
  cursor: pointer;
  gap: 6px;
}

.hero-dropdown > summary::-webkit-details-marker {
  display: none;
}

.hero-dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 190px;
  background: #fff;
  border: 1px solid #c7d8f5;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(30, 64, 175, 0.15);
  z-index: 50;
  list-style: none;
  padding: 5px;
  margin: 0;
}

.hero-dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 8px;
  color: #2d4470;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
}

.hero-dropdown-item:hover {
  background: #eef4fb;
  text-decoration: none;
  color: #1a3fa3;
}

.hero-dropdown-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1e40af, #2563eb);
  flex-shrink: 0;
}

/* Sélecteur de type de dossier (formulaire création/édition) */
.dossier-type-selector {
  background: #f8faff;
  border: 1px solid #d0daf5;
  border-radius: 8px;
  padding: 14px 18px;
}

.dossier-type-pills-wrap ul,
.dossier-type-pills-wrap div {
  display: flex !important;
  flex-wrap: wrap;
  gap: 10px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.dossier-type-pills-wrap li {
  display: inline-flex;
}

.dossier-type-pills-wrap label {
  display: inline-flex;
  align-items: center;
  gap: 0;
  padding: 6px 18px;
  border: 2px solid #3b5fc0;
  border-radius: 20px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  color: #3b5fc0;
  background: #fff;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  user-select: none;
}

.dossier-type-pills-wrap label:has(input:checked) {
  background: #3b5fc0;
  color: #fff;
  border-color: #3b5fc0;
}

.dossier-type-pills-wrap label:hover:not(:has(input:checked)) {
  background: #eef2ff;
}

.dossier-type-pills-wrap input[type="checkbox"] {
  display: none;
}

/* ── Suivi par type de dossier (section MPR readonly) ── */
.suivi-dates-block {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 14px 18px;
  background: #fafbfc;
}
.suivi-dates-block__label {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #8fa3be;
  margin-bottom: 12px;
}
/* Inputs éditables dans le bloc suivi : bordure visible pour les distinguer des readonly */
.suivi-dates-block input:not([readonly]) {
  background: #fff;
  border-color: #c7d2e1;
  color: var(--text);
}

/* Checkboxes groupés dans les formulaires superadmin */
[id$="_for_types"] {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1.4rem;
  padding: 0;
  margin: 0;
  list-style: none;
}
[id$="_for_types"] div {
  display: flex;
  align-items: center;
}
[id$="_for_types"] label {
  display: flex;
  align-items: center;
  gap: .4rem;
  font-weight: 500;
  font-size: .93rem;
  cursor: pointer;
  margin: 0;
}
[id$="_for_types"] input[type="checkbox"] {
  width: 1rem;
  height: 1rem;
  min-height: unset;
  border-radius: 4px;
  cursor: pointer;
  flex-shrink: 0;
}
.suivi-type-block {
  border: 1px solid #c7d9ef;
  border-radius: 12px;
  padding: 18px 20px;
  background: #f5f9ff;
}
.suivi-type-block__header {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding-bottom: 12px;
  margin-bottom: 14px;
  border-bottom: 1px solid #dde8f5;
}
.suivi-type-block__name {
  font-weight: 700;
  font-size: 1rem;
  color: #1e3a5f;
}
.suivi-type-block__status-badge {
  font-size: .8rem;
  letter-spacing: .02em;
  padding: 4px 10px;
}

/* ── Clé unique champs — disposition chips avec icône clé ── */
[id$="cle_unique_champs"] {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
[id$="cle_unique_champs"] > div {
  display: contents;
}
[id$="cle_unique_champs"] label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 11px 4px 8px;
  border: 1.5px solid #c8d8eb;
  border-radius: 20px;
  background: #f5f8fc;
  cursor: pointer;
  font-size: .8rem;
  font-weight: 500;
  color: #4a5568;
  transition: background .12s, border-color .12s, color .12s;
  user-select: none;
  line-height: 1.3;
}
[id$="cle_unique_champs"] label::before {
  content: "○";
  font-size: .65rem;
  color: #b0bec5;
  flex-shrink: 0;
}
[id$="cle_unique_champs"] input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 0;
  height: 0;
}
[id$="cle_unique_champs"] label:has(input:checked) {
  background: #fff8e1;
  border-color: #f59e0b;
  color: #78350f;
  font-weight: 600;
}
[id$="cle_unique_champs"] label:has(input:checked)::before {
  content: "🔑";
  font-size: .8rem;
}
[id$="cle_unique_champs"] label:hover:not(:has(input:checked)) {
  background: #eef5fd;
  border-color: #8bb8e8;
}

/* ── Bloc catégorie type dossier ── */
.cat-block {
  background: #f8fbff;
  border: 1px solid #dde8f5;
  border-radius: 10px;
  padding: 12px 14px;
  margin-top: 4px;
}
.cat-block__title {
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: #6b84a3;
  margin-bottom: 8px;
}
.cat-block--key {
  border-color: #f59e0b;
  background: #fffbeb;
}
.cat-block--dep {
  border-color: #818cf8;
  background: #f5f3ff;
}


/* ── Configurateur de colonnes du board ─────────────────────────────────── */
.col-cfg-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}

/* Barre d'actions du board (Rappels + Colonnes) */
.board-actions-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  background: rgba(248, 250, 252, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid #e2e8f0;
  position: sticky;
  top: 0;
  z-index: 20;
}

.rappels-tabs {
  display: flex;
  gap: 10px;
  flex: 1;
}

.board-rappels-btn, .board-alertes-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 18px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.board-rappels-btn {
  background: #f1f5f9;
  color: #64748b;
  border: 1px solid #cbd5e1;
}
.board-rappels-btn:hover {
  background: #e2e8f0;
  color: #334155;
  transform: translateY(-1px);
  box-shadow: 0 4px 6px rgba(0,0,0,0.08);
  text-decoration: none;
}
.board-rappels-btn--active {
  background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}
.board-rappels-btn--active:hover {
  background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
  color: #fff;
}

.board-alertes-btn {
  background: #fef2f2;
  color: #ef4444;
  border: 1px solid #fecaca;
}
.board-alertes-btn:hover {
  background: #fee2e2;
  color: #dc2626;
  transform: translateY(-1px);
  box-shadow: 0 4px 6px rgba(239, 68, 68, 0.15);
  text-decoration: none;
}
.board-alertes-btn--active {
  background: linear-gradient(135deg, #b91c1c 0%, #ef4444 100%);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}
.board-alertes-btn--active:hover {
  background: linear-gradient(135deg, #991b1b 0%, #dc2626 100%);
  color: #fff;
}

/* Modale de confirmation suppression dossier */
.crm-confirm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}
.crm-confirm-overlay[hidden] {
  display: none;
}
.crm-confirm-box {
  background: #fff;
  border-radius: 12px;
  padding: 28px 32px;
  max-width: 480px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
}
.crm-confirm-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #b91c1c;
  margin-bottom: 12px;
}
.crm-confirm-body {
  font-size: 0.9rem;
  line-height: 1.6;
  color: #374151;
  margin-bottom: 16px;
}
.crm-confirm-phrase {
  display: inline-block;
  margin-top: 6px;
  padding: 4px 8px;
  background: #fef2f2;
  border: 1px solid #fca5a5;
  border-radius: 4px;
  font-family: monospace;
  font-size: 0.88rem;
  color: #991b1b;
  word-break: break-all;
}
.col-cfg-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: .8rem;
}
.col-cfg-panel {
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0,0,0,.12);
  margin: 8px 16px 12px;
  max-width: 520px;
  z-index: 100;
}
.col-cfg-panel-inner {
  padding: 16px 20px 14px;
}
.col-cfg-panel-title {
  font-size: .9rem;
  font-weight: 700;
  margin-bottom: 4px;
}
.col-cfg-panel-hint {
  font-size: .78rem;
  color: #64748b;
  margin-bottom: 12px;
}
.col-cfg-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 340px;
  overflow-y: auto;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #f8fafc;
}
.col-cfg-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-bottom: 1px solid #e2e8f0;
  cursor: default;
  background: #fff;
  transition: background .1s;
}
.col-cfg-item:last-child { border-bottom: none; }
.col-cfg-item--hidden {
  opacity: .45;
  background: #f8fafc;
}
.col-cfg-item--fixed { cursor: default; }
.col-cfg-item[draggable=true] { cursor: grab; }
.col-cfg-item.drag-over { background: #eff6ff; outline: 2px dashed #3b82f6; }
.col-cfg-handle {
  color: #94a3b8;
  font-size: 1rem;
  flex-shrink: 0;
  user-select: none;
}
.col-cfg-item--fixed .col-cfg-handle { opacity: .3; }
.col-cfg-label {
  flex: 1;
  font-size: .82rem;
  font-weight: 500;
}
.col-cfg-badge {
  font-size: .7rem;
  color: #64748b;
  background: #e2e8f0;
  border-radius: 999px;
  padding: 1px 7px;
}
.col-cfg-remove {
  border: none;
  background: none;
  cursor: pointer;
  font-size: 1rem;
  color: #ef4444;
  padding: 0 4px;
  line-height: 1;
}
.col-cfg-item--hidden .col-cfg-remove { color: #22c55e; }
.col-cfg-add-icon { font-size: .9rem; }
.col-cfg-panel-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
}
.col-cfg-status {
  font-size: .78rem;
  color: #64748b;
  margin-left: auto;
}
/* Bouton ▼ dans les th du board */
.col-cfg-btn {
  border: none;
  background: none;
  cursor: pointer;
  font-size: .65rem;
  color: #94a3b8;
  padding: 0 2px;
  vertical-align: middle;
  opacity: 0;
  transition: opacity .15s;
}
.excel-grid thead th:hover .col-cfg-btn,
.col-cfg-btn:focus { opacity: 1; }

/* ── Panneau configuration filtres sidebar ─────────────────────────────── */
.filter-cfg-panel {
  position: fixed;
  top: 96px;
  left: 24px;
  width: 320px;
  max-width: calc(100vw - 48px);
  max-height: calc(100vh - 140px);
  overflow-y: auto;
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  box-shadow: 0 14px 44px rgba(8, 28, 90, .30);
  z-index: 1000;
}
.filter-cfg-panel-inner { padding: 12px 14px 10px; color: #1e293b; }
.filter-cfg-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.filter-cfg-panel-title {
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .03em;
  text-transform: uppercase;
  color: #334155;
}
.filter-cfg-close {
  border: 0;
  background: transparent;
  color: #94a3b8;
  font-size: 18px;
  line-height: 1;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background .15s ease, color .15s ease;
}
.filter-cfg-close:hover {
  background: #eef2f7;
  color: #1e293b;
}
.filter-cfg-hint {
  font-size: .75rem;
  color: #64748b;
  margin-bottom: 10px;
}
.filter-cfg-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 300px;
  overflow-y: auto;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #f8fafc;
}
.filter-cfg-item {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 9px;
  border-bottom: 1px solid #e2e8f0;
  background: #fff;
  cursor: grab;
  transition: background .1s;
}
.filter-cfg-item:last-child { border-bottom: none; }
.filter-cfg-item--hidden { opacity: .45; background: #f8fafc; }
.filter-cfg-handle { color: #94a3b8; font-size: 1rem; flex-shrink: 0; user-select: none; }
.filter-cfg-label { flex: 1; font-size: .8rem; font-weight: 500; }
.filter-cfg-remove {
  border: none; background: none; cursor: pointer;
  font-size: 1rem; color: #ef4444; padding: 0 3px; line-height: 1;
}
.filter-cfg-item--hidden .filter-cfg-remove { color: #22c55e; }
.filter-cfg-add-icon { font-size: .9rem; }
.filter-cfg-actions {
  display: flex; align-items: center; gap: 8px; margin-top: 10px;
}
.filter-cfg-status { font-size: .75rem; color: #64748b; margin-left: auto; }

/* Dossier relié — affichage lecture seule des champs uniques */
.crm-linked-readonly {
  margin-top: 10px;
  padding: 10px 12px;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
}
.crm-linked-readonly__title {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .03em;
  color: #475569;
  margin-bottom: 6px;
}
.crm-linked-readonly__row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 3px 0;
  font-size: .85rem;
  border-top: 1px solid #e2e8f0;
}
.crm-linked-readonly__row:first-of-type { border-top: none; }
.crm-linked-readonly__label { color: #64748b; }
.crm-linked-readonly__value { color: #0f172a; font-weight: 600; text-align: right; }

/* ─── RESPONSIVE GRANDS ÉCRANS ──────────────────────────────────────────────
   Améliore la lisibilité et l'espace de navigation sur les monitors larges.
   Paliers : 1400px / 1800px / 2200px
────────────────────────────────────────────────────────────────────────────── */

@media (min-width: 1400px) {
  .excel-shell {
    grid-template-columns: 300px minmax(0, 1fr);
  }
  .excel-sidebar {
    padding: 16px 13px 20px;
  }
  .excel-filter-label {
    font-size: 0.86rem;
  }
  .excel-filter-input {
    min-height: 30px;
    font-size: 0.83rem;
    padding: 0 10px;
  }
  .excel-action-btn {
    min-height: 30px;
    font-size: 0.82rem;
    padding: 0 12px;
  }
  .excel-filter-title {
    font-size: 0.93rem;
  }
  .split-workbench {
    grid-template-columns: minmax(0, 1fr) minmax(300px, 380px);
  }
}

@media (min-width: 1800px) {
  .excel-shell {
    grid-template-columns: 340px minmax(0, 1fr);
  }
  .excel-sidebar {
    padding: 18px 16px 24px;
  }
  .excel-filter-label {
    font-size: 0.92rem;
  }
  .excel-filter-input {
    min-height: 34px;
    font-size: 0.88rem;
    padding: 0 12px;
  }
  .excel-action-btn {
    min-height: 34px;
    font-size: 0.88rem;
    padding: 0 14px;
  }
  .excel-filter-title {
    font-size: 1rem;
  }
  .split-workbench {
    grid-template-columns: minmax(0, 1fr) minmax(340px, 440px);
  }
  .compact-filter-form {
    gap: 1rem;
  }
}

@media (min-width: 2200px) {
  .excel-shell {
    grid-template-columns: 400px minmax(0, 1fr);
  }
  .excel-sidebar {
    padding: 22px 20px 28px;
  }
  .excel-filter-label {
    font-size: 1rem;
  }
  .excel-filter-input {
    min-height: 38px;
    font-size: 0.95rem;
    padding: 0 14px;
    border-radius: 8px;
  }
  .excel-action-btn {
    min-height: 38px;
    font-size: 0.94rem;
    padding: 0 16px;
  }
  .excel-filter-title {
    font-size: 1.08rem;
  }
  .split-workbench {
    grid-template-columns: minmax(0, 1fr) minmax(380px, 520px);
  }
  .excel-filter-block {
    gap: 0.45rem;
    margin-bottom: 0.7rem;
    padding-bottom: 0.65rem;
  }
}
