@charset "UTF-8";
/* Variables CSS */
:root {
  --sidebar-width: 240px;
  --sidebar-mini-width: 80px;
  --sidebar-bg: #ffffff;
  --primary-color: #3b82f6;
  --text-primary: #1f2937;
  --text-secondary: #6b7280;
  --text-muted: #9ca3af;
  --border-color: #e5e7eb;
  --hover-bg: #f3f4f6;
  --active-bg: #dbeafe;
  --active-border: #3b82f6;
  --gradient-blue: linear-gradient(135deg, #2563eb 0%,#9333ea 100%);
}

/* reset */
.squircle {
  border-radius: 0.6em/0.5em;
}

.avatar {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.avatar-gradient-blue {
  background: linear-gradient(135deg, #2563eb 0%, #9333ea 100%) !important;
  color: white;
  font-weight: 600;
  font-size: 0.875rem;
}

.diagonal-arrow {
  display: inline-block;
  transform: rotate(-45deg) !important;
}

.btn-primary {
  background: var(--gradient-blue) !important;
  color: white !important;
  border: none !important;
}
.btn-primary:hover {
  background: linear-gradient(135deg, #9333ea 0%, #2563eb 100%) !important;
  background-size: 200% 200% !important;
  animation: gradientRotate 2s ease infinite !important;
  color: white !important;
  transition: all 1s ease;
}

.badge.bg-primary {
  background: var(--gradient-blue) !important;
  color: white !important;
}

/* Layout */
/* Classe de persistance pour éviter le flash */
.sidebar-mini-persist #sidebar {
  width: var(--sidebar-mini-width) !important;
}
.sidebar-mini-persist #sidebar .logo-text-container,
.sidebar-mini-persist #sidebar .nav-text,
.sidebar-mini-persist #sidebar .nav-submenu {
  opacity: 0 !important;
  visibility: hidden !important;
}
.sidebar-mini-persist #sidebar .nav-icon {
  margin-right: 0 !important;
}
.sidebar-mini-persist #sidebar .nav-link {
  gap: 0 !important;
  width: 3rem !important;
}
.sidebar-mini-persist .main-content {
  margin-left: var(--sidebar-mini-width) !important;
}

/* Sidebar principale */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background: var(--sidebar-bg);
  z-index: 1000;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

.sidebar.mini {
  width: var(--sidebar-mini-width);
}

.sidebar.mini .nav-link {
  gap: 0;
  width: 3rem;
}

/* Header de la sidebar */
.sidebar-header {
  padding: 1rem;
  background: var(--sidebar-bg);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 80px;
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo-gradient {
  width: 3rem;
  height: 3rem;
  background: linear-gradient(135deg, #2563eb 0%, #9333ea 100%);
  border-radius: 0.7rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}

.logo-img {
  width: 2rem;
  height: 2rem;
}

.logo-text-container {
  transition: opacity 0.3s ease;
}

.sidebar.mini .logo-text-container {
  opacity: 0;
  width: 0;
  overflow: hidden;
}

.sidebar.mini .toggle-btn {
  opacity: 0;
  width: 0;
  overflow: hidden;
  padding: 0;
  pointer-events: none;
}

.logo-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
  line-height: 1.2;
}

.logo-subtitle {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.2;
}

.toggle-btn {
  background: none;
  border: none;
  padding: 0.5rem;
  border-radius: 0.5rem;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all 0.25s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  flex-shrink: 0;
}

.toggle-btn:hover {
  background: var(--hover-bg);
  color: var(--text-primary);
}

/* Burger icon animé */
.burger-icon {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 18px;
  height: 18px;
  position: relative;
}

.burger-line {
  display: block;
  width: 18px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  position: absolute;
  left: 0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.burger-line:nth-child(1) {
  top: 3px;
  width: 18px;
}
.burger-line:nth-child(2) {
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
}
.burger-line:nth-child(3) {
  bottom: 3px;
  width: 10px;
}

.toggle-btn:hover .burger-line:nth-child(1), .toggle-btn:hover .burger-line:nth-child(2), .toggle-btn:hover .burger-line:nth-child(3) {
  width: 18px;
}

/* Burger -> flèche quand sidebar mini */
.sidebar.mini .burger-line:nth-child(1) {
  top: 4px;
  width: 10px;
  transform: rotate(45deg);
  transform-origin: left center;
}
.sidebar.mini .burger-line:nth-child(2) {
  width: 18px;
  opacity: 1;
}
.sidebar.mini .burger-line:nth-child(3) {
  bottom: 4px;
  width: 10px;
  transform: rotate(-45deg);
  transform-origin: left center;
}

/* Logo overlay en mode mini */
.logo-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.55);
  border-radius: inherit;
  opacity: 0;
  visibility: hidden;
  transition: all 0.25s ease;
  cursor: pointer;
  color: white;
  font-size: 1.1rem;
  backdrop-filter: blur(2px);
}

.sidebar.mini .logo-gradient:hover .logo-overlay {
  opacity: 1;
  visibility: visible;
}

.sidebar.mini .logo-overlay:active {
  background: rgba(0, 0, 0, 0.7);
}

/* Navigation */
.sidebar-nav {
  flex: 1;
  padding: 0.5rem 0;
  overflow-y: auto;
  background: var(--sidebar-bg);
}

.nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-item {
  display: flex;
  margin: 0;
  padding: 0;
  justify-content: start;
  flex-wrap: wrap;
  width: 100%;
}

.sidebar.mini .nav-item {
  flex-wrap: wrap;
  justify-content: center;
}

.nav-link {
  display: flex;
  align-items: center;
  justify-content: start;
  padding: 0.75rem;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all 0.2s ease;
  position: relative;
  font-size: 0.875rem;
  font-weight: 500;
  gap: 0.75rem;
  border-radius: 0.5rem;
  margin: 0.125rem 0.5rem;
  min-height: 2.5rem;
  width: 100%;
}

.sidebar.mini .nav-link {
  display: grid;
  justify-content: center;
  width: 3rem;
  height: 3rem;
}

.nav-link:hover {
  background: var(--hover-bg);
  color: var(--text-primary);
}

.nav-link.active {
  background: var(--active-bg);
  color: var(--active-border);
  font-weight: 600;
}

.nav-icon {
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
}

.nav-text {
  transition: opacity 0.3s ease;
}

.sidebar.mini .nav-text {
  opacity: 0;
  width: 0;
  overflow: hidden;
}

.sidebar.mini .nav-arrow {
  display: none;
}

.nav-arrow {
  margin-left: auto;
  transition: transform 0.2s ease;
}

.nav-item.open .nav-arrow {
  transform: rotate(180deg);
}

/* Submenu - Comportement différent selon le mode */
.nav-submenu {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.nav-item.open .nav-submenu {
  max-height: 200px;
  width: 100%;
}

.nav-subitem {
  margin: 0;
  padding: 0;
}

.nav-sublink {
  display: flex;
  align-items: center;
  padding: 0.5rem 1rem 0.5rem 2.5rem;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.875rem;
  transition: all 0.2s ease;
  gap: 0.75rem;
  border-radius: 0.375rem;
  margin: 0.125rem 0.5rem;
}

.nav-sublink:hover {
  background: var(--active-bg);
  color: var(--text-primary);
}

.nav-dot {
  width: 0.375rem;
  height: 0.375rem;
  background: var(--text-muted);
  border-radius: 50%;
  flex-shrink: 0;
}

/* En mode mini, le submenu devient un menu contextuel flottant */
.sidebar.mini .nav-submenu {
  position: fixed;
  left: 4.25rem;
  top: auto;
  background: white;
  border-radius: 0.5rem;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  border: 1px solid var(--border-color);
  min-width: 12rem;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s ease;
  max-height: none;
  overflow: visible;
}

.sidebar.mini .nav-item.open .nav-submenu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  width: 12rem;
}

.sidebar.mini .nav-sublink {
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  margin: 0.125rem;
}

/* Indicateur de connexion pour le menu contextuel en mode mini */
.sidebar.mini .nav-submenu::before {
  content: "";
  position: absolute;
  left: -0.25rem;
  top: 1rem;
  width: 0.25rem;
  height: 0.25rem;
  background: transparent;
}

/* Tooltip flottant pour la sidebar en mode mini (positionné en JS) */
.sidebar-tooltip {
  position: fixed;
  background: #1f2937;
  color: #fff;
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1;
  padding: 0.5rem 0.75rem;
  border-radius: 0.375rem;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-50%) translateX(-4px);
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 1100;
}

.sidebar-tooltip::before {
  content: "";
  position: absolute;
  right: 100%;
  top: 50%;
  transform: translateY(-50%);
  border: 0.3rem solid transparent;
  border-right-color: #1f2937;
}

.sidebar-tooltip.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(-50%) translateX(0);
}

/* Footer de la sidebar */
.sidebar-footer {
  padding: 1rem;
  border-top: 1px solid var(--border-color);
  background: var(--sidebar-bg);
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem;
  border-radius: 0.5rem;
  transition: all 0.2s ease;
}

.user-profile:hover {
  background: var(--hover-bg);
  cursor: pointer;
}

.user-avatar {
  position: relative;
  width: 2rem;
  height: 2rem;
  background: var(--primary-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.user-avatar-text {
  color: white;
  font-weight: 600;
  font-size: 0.875rem;
}

.user-status {
  position: absolute;
  bottom: -0.125rem;
  right: -0.125rem;
  width: 0.75rem;
  height: 0.75rem;
  background: #10b981;
  border: 2px solid white;
  border-radius: 50%;
}

.user-info {
  flex: 1;
  transition: opacity 0.3s ease;
}

.sidebar.mini .user-info {
  opacity: 0;
  width: 0;
  overflow: hidden;
}

.sidebar.mini .user-context-menu .user-info {
  opacity: 1;
  width: auto;
  overflow: hidden;
}

.user-name {
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--text-primary);
  margin: 0;
  line-height: 1.2;
}

.user-role {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.2;
}

.user-logout {
  background: none;
  border: none;
  padding: 0.5rem;
  border-radius: 0.375rem;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.user-logout:hover {
  background: var(--hover-bg);
  color: var(--text-primary);
}

.sidebar.mini .user-logout {
  opacity: 0;
  width: 0;
  overflow: hidden;
}

/* Mobile Menu Button */
.mobile-menu-btn {
  background: white;
  border: 1px solid var(--border-color);
  padding: 0.75rem;
  border-radius: 0.5rem;
  cursor: pointer;
  color: var(--text-primary);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  transition: all 0.2s ease;
}

.mobile-menu-btn:hover {
  background: var(--hover-bg);
}

/* Responsive */
@media (max-width: 768px) {
  .toggle-btn {
    display: none;
  }
  .sidebar-header {
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .logo-container {
    gap: 0;
  }
}
/* Scrollbar personnalisée */
.sidebar-nav::-webkit-scrollbar {
  width: 4px;
}

.sidebar-nav::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar-nav::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 2px;
}

.sidebar-nav::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* Menu contextuel utilisateur */
.user-context-menu {
  position: fixed;
  background: white;
  border-radius: 0.5rem;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  border: 1px solid var(--border-color);
  min-width: 12rem;
  z-index: 1001;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s ease;
  overflow: hidden;
}

.user-context-menu.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.context-menu-list {
  list-style: none;
  margin: 0;
  padding: 0.25rem;
}

.context-menu-item {
  margin: 0;
  padding: 0;
}

.context-menu-link {
  display: flex;
  align-items: center;
  padding: 0.75rem 1rem;
  color: var(--text-primary);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s ease;
  gap: 0.75rem;
  border-radius: 0.375rem;
  position: relative;
}

.context-menu-link:hover {
  background: var(--hover-bg);
  color: var(--text-primary);
}

.context-menu-icon {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
  color: var(--text-secondary);
}

.context-menu-text {
  flex: 1;
}

.context-menu-divider {
  height: 1px;
  background: var(--border-color);
  margin: 0.25rem 0.5rem;
}

/* Styles spécifiques pour les liens de déconnexion */
.context-menu-item:last-child .context-menu-link {
  color: #ef4444;
}

.context-menu-item:last-child .context-menu-link:hover {
  background: #fef2f2;
  color: #dc2626;
}

.context-menu-item:last-child .context-menu-icon {
  color: #ef4444;
}

/* Mode mini - repositionnement du menu */
.sidebar.mini .user-context-menu {
  left: 4.5rem;
}

/* Animation d'entrée */
@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(-10px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}
.user-context-menu.show {
  animation: slideInRight 0.2s ease-out;
}

.toolBar-container {
  position: sticky;
  top: 0;
  z-index: 100;
  transition: margin-left 0.3s ease;
  min-height: 81px;
  background: var(--sidebar-bg);
}

.sidebar.mini + .toolBar-container {
  margin-left: var(--sidebar-mini-width);
}

.toolBar-container .input-group {
  width: 400px;
}

/* Dashboard Styles - Sidebar selon l'image d'inspiration */
/* Main Content */
.main-content {
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  transition: margin-left 0.3s ease;
}

.sidebar.mini + .main-content {
  margin-left: var(--sidebar-mini-width);
}

.main-content-area {
  padding: 2rem 2rem 0rem;
  background: white;
}

.content-title {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--text-primary);
  margin: 0 0 1rem 0;
}

.content-text {
  color: var(--text-secondary);
  margin: 0;
}

@media (max-width: 768px) {
  .main-content-area {
    padding: 1rem;
  }
}
.input-group .form-control:focus, .input-group .form-control:focus-visible, .input-group .input-group-text:focus, .input-group .input-group-text:focus-visible {
  outline: none !important;
  box-shadow: none;
  border-color: var(--border-color) !important;
}
.input-group:focus-visible, .input-group:active, .input-group:hover, .input-group:focus {
  outline: none !important;
  box-shadow: none;
  border-color: var(--border-color) !important;
}
.input-group [data-toggle-password] {
  border-left: 0;
  background-color: #f8f9fa;
  border-color: #ced4da;
  color: #6c757d;
  transition: all 0.2s ease;
}
.input-group [data-toggle-password]:hover {
  background-color: #e9ecef;
  border-color: #adb5bd;
  color: #495057;
}
.input-group [data-toggle-password]:focus {
  box-shadow: none;
  border-color: #ced4da;
}
.input-group [data-toggle-password] .eye-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
}

/* components partagés requis avant les pages (extend) */
/* ─────────────────────────────────────────────────────────────────
   Wizard Offcanvas — composant générique (contacts, clients, deals,
   produits, tâches, utilisateurs…)

   Markup attendu :
     .offcanvas.offcanvas-end.wizard-offcanvas
       └─ .wizard-offcanvas-inner
           ├─ .wizard-offcanvas-header
           │   ├─ .wizard-offcanvas-header-top (titre + close)
           │   └─ .wizard-stepper > .wizard-step + .wizard-step-sep…
           ├─ .wizard-offcanvas-body
           │   └─ .wizard-pane[data-step] (.is-active sur l'étape courante)
           └─ .wizard-offcanvas-footer
   ───────────────────────────────────────────────────────────────── */
/* ─── Conteneur ──────────────────────────────────────────────── */
.wizard-offcanvas.offcanvas, .offcanvas.contact-offcanvas {
  border: none;
  background: transparent;
  box-shadow: none;
  width: 760px;
  max-width: calc(100vw - 28px);
  top: 14px;
  right: 14px;
  bottom: 14px;
  height: auto;
  padding: 0;
  transform: translateX(calc(100% + 22px));
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.wizard-offcanvas.offcanvas.show, .offcanvas.show.contact-offcanvas, .wizard-offcanvas.offcanvas.showing, .offcanvas.showing.contact-offcanvas {
  transform: translateX(0);
}
.wizard-offcanvas.offcanvas.hiding, .offcanvas.hiding.contact-offcanvas {
  transform: translateX(calc(100% + 22px));
}
.wizard-offcanvas.wizard-offcanvas-wide.offcanvas, .wizard-offcanvas.offcanvas.contact-offcanvas-wide, .wizard-offcanvas-wide.offcanvas.contact-offcanvas, .offcanvas.contact-offcanvas.contact-offcanvas-wide {
  width: 760px;
}

/* Backdrop : fondu synchronisé avec la durée du panel */
.offcanvas-backdrop.fade {
  transition: opacity 0.35s ease;
}

.wizard-offcanvas-inner, .contact-offcanvas-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 14px 50px rgba(15, 23, 42, 0.14), 0 0 1px rgba(15, 23, 42, 0.08);
  overflow: hidden;
  /* Permet au footer d'être collé en bas même quand body+footer sont
     enveloppés dans un <form> (cas deals/clients/users/products/reminders).
     Le form devient lui aussi un container flex transparent. */
}
.wizard-offcanvas-inner > form, .contact-offcanvas-inner > form {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

/* ─── Header (sobre, blanc) ──────────────────────────────────── */
.wizard-offcanvas-header, .contact-offcanvas-header {
  flex-shrink: 0;
  background: #fff;
  padding: 18px 24px 14px;
  position: relative;
  color: #111827;
  border-bottom: 1px solid #f1f3f5;
}

.wizard-offcanvas-header-top, .contact-offcanvas-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 16px;
}

.wizard-offcanvas-title-group, .contact-offcanvas-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.wizard-offcanvas-title, .contact-offcanvas-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #111827;
  margin: 0;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wizard-offcanvas-subtitle, .contact-offcanvas-subtitle {
  font-size: 0.78rem;
  color: #6b7280;
  margin: 2px 0 0;
}

.wizard-offcanvas-close, .contact-offcanvas-close {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  background: #fff;
  color: #6b7280;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  flex-shrink: 0;
}
.wizard-offcanvas-close i, .contact-offcanvas-close i {
  font-size: 17px;
}
.wizard-offcanvas-close:hover, .contact-offcanvas-close:hover {
  background: #f3f4f6;
  color: #111827;
  border-color: #d1d5db;
}

/* ─── Stepper (pills noir / gris) ────────────────────────────── */
.wizard-stepper {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.wizard-step {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px 6px 8px;
  background: #f3f4f6;
  border: 1px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  color: #6b7280;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  flex: 0 1 auto;
  min-width: 0;
}
.wizard-step .wizard-step-num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #e5e7eb;
  color: #6b7280;
  font-weight: 700;
  font-size: 0.72rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.2s, color 0.2s;
}
.wizard-step .wizard-step-label {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  line-height: 1.2;
  min-width: 0;
}
.wizard-step .wizard-step-title {
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.wizard-step:hover {
  background: #e5e7eb;
}
.wizard-step:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(17, 24, 39, 0.15);
}
.wizard-step.is-active:hover {
  background: #1f2937;
}
.wizard-step.is-active {
  background: #111827;
  color: #fff;
}
.wizard-step.is-active .wizard-step-num {
  background: #fff;
  color: #111827;
}
.wizard-step.is-done {
  background: #f3f4f6;
  color: #111827;
}
.wizard-step.is-done .wizard-step-num {
  background: #111827;
  color: #fff;
  position: relative;
  font-size: 0;
}
.wizard-step.is-done .wizard-step-num::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 46%;
  width: 5px;
  height: 9px;
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: translate(-50%, -50%) rotate(45deg);
}

.wizard-step-sep {
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  border-top: 1.5px solid #c4c9d2;
  border-right: 1.5px solid #c4c9d2;
  transform: rotate(45deg);
  margin: 0 4px;
}

/* ─── Body / Panes ───────────────────────────────────────────── */
.wizard-offcanvas-body, .contact-offcanvas-body {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 28px 32px;
  overscroll-behavior: contain;
  background: #fafbfc;
}
.wizard-offcanvas-body::-webkit-scrollbar, .contact-offcanvas-body::-webkit-scrollbar {
  width: 6px;
}
.wizard-offcanvas-body::-webkit-scrollbar-track, .contact-offcanvas-body::-webkit-scrollbar-track {
  background: transparent;
}
.wizard-offcanvas-body::-webkit-scrollbar-thumb, .contact-offcanvas-body::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 10px;
}

.wizard-pane {
  display: none;
  animation: wizardFadeSlide 0.25s ease;
}
.wizard-pane.is-active {
  display: block;
}

@keyframes wizardFadeSlide {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.wizard-pane-head {
  margin-bottom: 22px;
}
.wizard-pane-head h6 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.02rem;
  font-weight: 700;
  color: #111827;
  margin: 0 0 4px;
}
.wizard-pane-head h6 i {
  color: #4f46e5;
  font-size: 1.1rem;
}
.wizard-pane-head p {
  font-size: 0.85rem;
  color: #6b7280;
  margin: 0;
}

/* ─── Form fields — validation rouge / vert ──────────────────── */
.form-field {
  position: relative;
}
.form-field .form-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 6px;
  display: block;
}
.form-field .form-label .req {
  color: #ef4444;
}
.form-field .field-feedback {
  font-size: 0.76rem;
  margin-top: 5px;
  min-height: 1em;
  color: #ef4444;
  display: flex;
  align-items: center;
  gap: 4px;
}
.form-field .field-feedback.field-hint {
  color: #6b7280;
  font-weight: 500;
}
.form-field .field-feedback.field-hint i {
  color: #4f46e5;
}
.form-field.field-valid .field-feedback {
  color: #10b981;
}
.form-field.field-invalid .field-feedback {
  color: #ef4444;
}

.form-input-wrap {
  position: relative;
}
.form-input-wrap .form-input-icon {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 17px;
  color: #9ca3af;
  pointer-events: none;
  z-index: 2;
  transition: color 0.2s;
}
.form-input-wrap .form-input-status {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 17px;
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
  z-index: 2;
}
.form-input-wrap .form-input-status-valid {
  color: #10b981;
}
.form-input-wrap .form-input-status-invalid {
  color: #ef4444;
}
.form-input-wrap .form-input-suffix {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.85rem;
  color: #6b7280;
  pointer-events: none;
}

.wizard-offcanvas-body .form-control, .contact-offcanvas-body .form-control,
.wizard-offcanvas-body .form-select,
.contact-offcanvas-body .form-select {
  border-radius: 11px;
  border: 1.5px solid #e5e7eb;
  padding: 0.62rem 0.9rem;
  font-size: 0.88rem;
  background: #fff;
  transition: border-color 0.18s, box-shadow 0.18s, background-color 0.18s;
}
.wizard-offcanvas-body .form-control::-moz-placeholder, .contact-offcanvas-body .form-control::-moz-placeholder, .wizard-offcanvas-body .form-select::-moz-placeholder, .contact-offcanvas-body .form-select::-moz-placeholder {
  color: #c4c9d2;
}
.wizard-offcanvas-body .form-control::placeholder, .contact-offcanvas-body .form-control::placeholder,
.wizard-offcanvas-body .form-select::placeholder,
.contact-offcanvas-body .form-select::placeholder {
  color: #c4c9d2;
}
.wizard-offcanvas-body .form-control:focus, .contact-offcanvas-body .form-control:focus,
.wizard-offcanvas-body .form-select:focus,
.contact-offcanvas-body .form-select:focus {
  border-color: #4f46e5;
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.12);
  outline: none;
}
.wizard-offcanvas-body .form-input-wrap > .form-control, .contact-offcanvas-body .form-input-wrap > .form-control,
.wizard-offcanvas-body .form-input-wrap > .form-select,
.contact-offcanvas-body .form-input-wrap > .form-select {
  padding-left: 42px;
}
.wizard-offcanvas-body .form-input-wrap > .form-control.is-valid,
.wizard-offcanvas-body .form-input-wrap > .form-select.is-valid,
.wizard-offcanvas-body .form-control.is-valid,
.contact-offcanvas-body .form-control.is-valid,
.wizard-offcanvas-body .form-select.is-valid,
.contact-offcanvas-body .form-select.is-valid {
  border-color: #10b981;
  background-image: none;
  padding-right: 40px;
}
.wizard-offcanvas-body .form-input-wrap > .form-control.is-valid:focus,
.wizard-offcanvas-body .form-input-wrap > .form-select.is-valid:focus,
.wizard-offcanvas-body .form-control.is-valid:focus,
.contact-offcanvas-body .form-control.is-valid:focus,
.wizard-offcanvas-body .form-select.is-valid:focus,
.contact-offcanvas-body .form-select.is-valid:focus {
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.12);
}
.wizard-offcanvas-body .form-input-wrap > .form-control.is-valid ~ .form-input-status-valid,
.wizard-offcanvas-body .form-input-wrap > .form-select.is-valid ~ .form-input-status-valid,
.wizard-offcanvas-body .form-control.is-valid ~ .form-input-status-valid,
.contact-offcanvas-body .form-control.is-valid ~ .form-input-status-valid,
.wizard-offcanvas-body .form-select.is-valid ~ .form-input-status-valid,
.contact-offcanvas-body .form-select.is-valid ~ .form-input-status-valid {
  opacity: 1;
}
.wizard-offcanvas-body .form-input-wrap > .form-control.is-invalid,
.wizard-offcanvas-body .form-input-wrap > .form-select.is-invalid,
.wizard-offcanvas-body .form-control.is-invalid,
.contact-offcanvas-body .form-control.is-invalid,
.wizard-offcanvas-body .form-select.is-invalid,
.contact-offcanvas-body .form-select.is-invalid {
  border-color: #ef4444;
  background-image: none;
  padding-right: 40px;
}
.wizard-offcanvas-body .form-input-wrap > .form-control.is-invalid:focus,
.wizard-offcanvas-body .form-input-wrap > .form-select.is-invalid:focus,
.wizard-offcanvas-body .form-control.is-invalid:focus,
.contact-offcanvas-body .form-control.is-invalid:focus,
.wizard-offcanvas-body .form-select.is-invalid:focus,
.contact-offcanvas-body .form-select.is-invalid:focus {
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.12);
}
.wizard-offcanvas-body .form-input-wrap > .form-control.is-invalid ~ .form-input-status-invalid,
.wizard-offcanvas-body .form-input-wrap > .form-select.is-invalid ~ .form-input-status-invalid,
.wizard-offcanvas-body .form-control.is-invalid ~ .form-input-status-invalid,
.contact-offcanvas-body .form-control.is-invalid ~ .form-input-status-invalid,
.wizard-offcanvas-body .form-select.is-invalid ~ .form-input-status-invalid,
.contact-offcanvas-body .form-select.is-invalid ~ .form-input-status-invalid {
  opacity: 1;
}
.wizard-offcanvas-body textarea.form-control, .contact-offcanvas-body textarea.form-control {
  resize: vertical;
  min-height: 100px;
}

/* ─── Footer ─────────────────────────────────────────────────── */
.wizard-offcanvas-footer, .contact-offcanvas-footer {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 28px;
  border-top: 1px solid #eef0f3;
  background: #fff;
  border-radius: 0 0 18px 18px;
}
.wizard-offcanvas-footer .btn, .contact-offcanvas-footer .btn {
  border-radius: 11px;
  padding: 0.55rem 1.25rem;
  font-weight: 600;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
}
.wizard-offcanvas-footer .btn i, .contact-offcanvas-footer .btn i {
  font-size: 1.05rem;
}
.wizard-offcanvas-footer .btn-light, .contact-offcanvas-footer .btn-light {
  background: #fff;
  border: 1.5px solid #e5e7eb;
  color: #374151;
}
.wizard-offcanvas-footer .btn-light:hover, .contact-offcanvas-footer .btn-light:hover {
  background: #f3f4f6;
}
.wizard-offcanvas-footer .btn-primary, .contact-offcanvas-footer .btn-primary {
  background: #4f46e5;
  border-color: #4f46e5;
  box-shadow: 0 6px 14px rgba(79, 70, 229, 0.28);
}
.wizard-offcanvas-footer .btn-primary:hover, .contact-offcanvas-footer .btn-primary:hover {
  background: rgb(53.4758293839, 43.1706161137, 225.2293838863);
  border-color: rgb(53.4758293839, 43.1706161137, 225.2293838863);
}
.wizard-offcanvas-footer .btn-primary:disabled, .contact-offcanvas-footer .btn-primary:disabled {
  opacity: 0.65;
}
.wizard-offcanvas-footer .btn-danger, .contact-offcanvas-footer .btn-danger {
  background: #ef4444;
  border-color: #ef4444;
  color: #fff;
  box-shadow: 0 6px 14px rgba(239, 68, 68, 0.25);
}
.wizard-offcanvas-footer .btn-danger:hover, .contact-offcanvas-footer .btn-danger:hover {
  background: rgb(236.5881773399, 39.8118226601, 39.8118226601);
  border-color: rgb(236.5881773399, 39.8118226601, 39.8118226601);
}

/* ─── Mode-cards (radio cards style "select / create") ───────── */
.wizard-mode-cards, .company-mode-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.wizard-mode-card, .company-mode-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border: 1.5px solid #e5e7eb;
  border-radius: 14px;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
  margin: 0;
}
.wizard-mode-card:hover, .company-mode-card:hover {
  border-color: #c7d2fe;
}
.wizard-mode-card .wizard-mode-card-icon, .wizard-mode-card .company-mode-card-icon, .company-mode-card .wizard-mode-card-icon, .company-mode-card .company-mode-card-icon {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.wizard-mode-card .wizard-mode-card-icon i, .wizard-mode-card .company-mode-card-icon i, .company-mode-card .wizard-mode-card-icon i, .company-mode-card .company-mode-card-icon i {
  font-size: 22px;
  color: #4f46e5;
}
.wizard-mode-card .wizard-mode-card-title, .wizard-mode-card .company-mode-card-title, .company-mode-card .wizard-mode-card-title, .company-mode-card .company-mode-card-title {
  font-weight: 600;
  font-size: 0.92rem;
  color: #111827;
}
.wizard-mode-card .wizard-mode-card-desc, .wizard-mode-card .company-mode-card-desc, .company-mode-card .wizard-mode-card-desc, .company-mode-card .company-mode-card-desc {
  font-size: 0.76rem;
  color: #6b7280;
  margin-top: 2px;
}
.wizard-mode-card .wizard-mode-card-check, .wizard-mode-card .company-mode-card-check, .company-mode-card .wizard-mode-card-check, .company-mode-card .company-mode-card-check {
  position: absolute;
  top: 12px;
  right: 12px;
  font-size: 20px;
  color: #d1d5db;
  opacity: 0;
  transition: opacity 0.2s, color 0.2s;
}
.wizard-mode-card.is-selected, .is-selected.company-mode-card {
  border-color: #4f46e5;
  background: #f5f3ff;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.08);
}
.wizard-mode-card.is-selected .wizard-mode-card-check, .wizard-mode-card.is-selected .company-mode-card-check, .is-selected.company-mode-card .wizard-mode-card-check, .is-selected.company-mode-card .company-mode-card-check {
  opacity: 1;
  color: #4f46e5;
}

/* ─── Recherche entreprise (autocomplete) ────────────────────── */
.company-search-wrap {
  position: relative;
}
.company-search-wrap .company-search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #9ca3af;
  font-size: 18px;
  z-index: 1;
  pointer-events: none;
}
.company-search-wrap .company-search-input {
  padding-left: 42px;
  height: 48px;
  border-radius: 12px;
  font-size: 0.92rem;
}

.company-suggest {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 1080;
  max-height: 320px;
  overflow-y: auto;
  border: 1px solid #e5e7eb;
  background: #fff;
  box-shadow: 0 10px 40px rgba(15, 23, 42, 0.12);
  border-radius: 12px;
  padding: 6px;
}

.company-suggest-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s;
}
.company-suggest-item:hover, .company-suggest-item.active {
  background: #f5f3ff;
}
.company-suggest-item .company-suggest-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, #eef2ff, #e0e7ff);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.company-suggest-item .company-suggest-icon i {
  color: #4f46e5;
  font-size: 18px;
}
.company-suggest-item .company-suggest-body {
  flex: 1;
  min-width: 0;
}
.company-suggest-item .company-suggest-title {
  font-weight: 600;
  color: #111827;
  font-size: 0.88rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.company-suggest-item .company-suggest-meta {
  font-size: 0.76rem;
  color: #6b7280;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.company-suggest-item .company-suggest-extra {
  margin-top: 4px;
}
.company-suggest-item .company-suggest-siret {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.7rem;
  color: #4f46e5;
  background: #eef2ff;
  border-radius: 999px;
  padding: 2px 8px;
  font-weight: 500;
}

.company-summary {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 14px;
  background: linear-gradient(135deg, #ecfdf5 0%, #f0fdfa 100%);
  border: 1.5px solid #a7f3d0;
  margin: 18px 0 4px;
  position: relative;
}
.company-summary .company-summary-icon {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  background: rgba(16, 185, 129, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.company-summary .company-summary-icon i {
  color: #047857;
  font-size: 22px;
}
.company-summary .company-summary-body {
  flex: 1;
  min-width: 0;
}
.company-summary .company-summary-title {
  font-weight: 700;
  color: #064e3b;
  font-size: 0.95rem;
}
.company-summary .company-summary-meta {
  font-size: 0.8rem;
  color: #065f46;
  margin-top: 2px;
}
.company-summary .company-summary-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.company-summary .company-summary-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.7rem;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.7);
  color: #065f46;
  border-radius: 999px;
  padding: 3px 9px;
}
.company-summary .company-summary-tag i {
  font-size: 0.8rem;
}
.company-summary .company-summary-clear {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: #047857;
  cursor: pointer;
  transition: background 0.2s;
}
.company-summary .company-summary-clear:hover {
  background: rgba(255, 255, 255, 0.6);
}

/* ─── Picker générique (clients, contacts, produits…) ────────── */
.entity-picker, .client-picker {
  position: relative;
}

.entity-picker-trigger, .client-picker-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px 8px 8px;
  min-height: 50px;
  background: #fff;
  border: 1.5px solid #e5e7eb;
  border-radius: 12px;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
  text-align: left;
}
.entity-picker-trigger:hover, .client-picker-trigger:hover {
  border-color: #d1d5db;
}
.entity-picker-trigger .entity-picker-trigger-caret, .entity-picker-trigger .client-picker-trigger-caret, .client-picker-trigger .entity-picker-trigger-caret, .client-picker-trigger .client-picker-trigger-caret {
  margin-left: auto;
  color: #9ca3af;
  font-size: 18px;
  transition: transform 0.2s;
}

.entity-picker.is-open .entity-picker-trigger, .entity-picker.is-open .client-picker-trigger, .is-open.client-picker .entity-picker-trigger, .is-open.client-picker .client-picker-trigger {
  border-color: #4f46e5;
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.12);
}
.entity-picker.is-open .entity-picker-trigger .entity-picker-trigger-caret, .entity-picker.is-open .entity-picker-trigger .client-picker-trigger-caret, .entity-picker.is-open .client-picker-trigger .entity-picker-trigger-caret, .entity-picker.is-open .client-picker-trigger .client-picker-trigger-caret, .is-open.client-picker .entity-picker-trigger .entity-picker-trigger-caret, .is-open.client-picker .entity-picker-trigger .client-picker-trigger-caret, .is-open.client-picker .client-picker-trigger .entity-picker-trigger-caret, .is-open.client-picker .client-picker-trigger .client-picker-trigger-caret {
  transform: rotate(180deg);
  color: #4f46e5;
}

.entity-picker-trigger-content, .client-picker-trigger-content {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.entity-picker-placeholder, .client-picker-placeholder {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #9ca3af;
  font-size: 0.88rem;
}
.entity-picker-placeholder i, .client-picker-placeholder i {
  font-size: 18px;
  color: #c4c9d2;
}

.entity-picker-name, .client-picker-name {
  font-weight: 600;
  color: #111827;
  font-size: 0.9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.entity-picker-clear, .client-picker-clear {
  width: 26px;
  height: 26px;
  border: none;
  background: transparent;
  color: #9ca3af;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  margin-left: 6px;
}
.entity-picker-clear:hover, .client-picker-clear:hover {
  background: #f3f4f6;
  color: #111827;
}

.entity-picker-avatar, .client-picker-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.entity-picker-dropdown, .client-picker-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 1080;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  box-shadow: 0 14px 50px rgba(15, 23, 42, 0.14);
  overflow: hidden;
}

.entity-picker-search, .client-picker-search {
  position: relative;
  padding: 10px 12px;
  border-bottom: 1px solid #f1f3f5;
}
.entity-picker-search i, .client-picker-search i {
  position: absolute;
  left: 24px;
  top: 50%;
  transform: translateY(-50%);
  color: #9ca3af;
  font-size: 17px;
  pointer-events: none;
}
.entity-picker-search input, .client-picker-search input {
  width: 100%;
  border: 1.5px solid #e5e7eb;
  background: #fafbfc;
  border-radius: 10px;
  padding: 9px 12px 9px 38px;
  font-size: 0.88rem;
  outline: none;
  transition: border-color 0.15s, background 0.15s;
}
.entity-picker-search input:focus, .client-picker-search input:focus {
  border-color: #4f46e5;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
}

.entity-picker-list, .client-picker-list {
  max-height: 320px;
  overflow-y: auto;
  padding: 6px;
}
.entity-picker-list::-webkit-scrollbar, .client-picker-list::-webkit-scrollbar {
  width: 6px;
}
.entity-picker-list::-webkit-scrollbar-thumb, .client-picker-list::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 10px;
}

.entity-picker-section-label, .client-picker-section-label {
  padding: 8px 10px 6px;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #6b7280;
}

.entity-picker-item, .client-picker-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border: none;
  background: transparent;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.12s;
  text-align: left;
}
.entity-picker-item:hover, .client-picker-item:hover, .entity-picker-item.is-active, .is-active.client-picker-item {
  background: #f5f3ff;
}
.entity-picker-item.is-selected, .is-selected.client-picker-item {
  background: #eef2ff;
}
.entity-picker-item .entity-picker-item-body, .entity-picker-item .client-picker-item-body, .client-picker-item .entity-picker-item-body, .client-picker-item .client-picker-item-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.entity-picker-item .entity-picker-item-name, .entity-picker-item .client-picker-item-name, .client-picker-item .entity-picker-item-name, .client-picker-item .client-picker-item-name {
  font-weight: 600;
  font-size: 0.88rem;
  color: #111827;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.entity-picker-item .entity-picker-item-meta, .client-picker-item .entity-picker-item-meta {
  font-size: 0.74rem;
  color: #6b7280;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.entity-picker-item .entity-picker-item-check, .entity-picker-item .client-picker-item-check, .client-picker-item .entity-picker-item-check, .client-picker-item .client-picker-item-check {
  color: #4f46e5;
  font-size: 18px;
  margin-left: auto;
}

.entity-picker-empty, .client-picker-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 6px;
  padding: 24px 20px 14px;
  color: #6b7280;
  font-size: 0.85rem;
  text-align: center;
}
.entity-picker-empty i, .client-picker-empty i {
  font-size: 30px;
  color: #d1d5db;
}

.entity-picker-create, .client-picker-create {
  margin: 6px;
  padding: 10px 14px;
  background: linear-gradient(135deg, #f5f3ff 0%, #eef2ff 100%);
  border: 1.5px dashed #c7d2fe;
  border-radius: 10px;
  color: #4f46e5;
  font-size: 0.85rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  width: calc(100% - 12px);
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
}
.entity-picker-create:hover, .client-picker-create:hover {
  background: #ede9fe;
  border-color: #4f46e5;
}
.entity-picker-create:active, .client-picker-create:active {
  transform: scale(0.98);
}
.entity-picker-create i, .client-picker-create i {
  font-size: 16px;
}
.entity-picker-create span, .client-picker-create span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: left;
  flex: 1 1 auto;
}

/* ─── Chips picker (multi-select avec recherche + chips colorées) ── */
.chips-picker {
  position: relative;
}

.chips-picker-field {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  min-height: 46px;
  padding: 8px 10px;
  background: #fff;
  border: 1.5px solid #e5e7eb;
  border-radius: 11px;
  cursor: text;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.chips-picker.is-open .chips-picker-field {
  border-color: #4f46e5;
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.12);
}

.chips-picker-chips {
  display: contents;
}

.chips-picker-placeholder {
  color: #9ca3af;
  font-size: 0.85rem;
  padding: 2px 4px;
}

.chips-picker-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 6px 4px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1;
  max-width: 100%;
}
.chips-picker-chip .chips-picker-chip-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.chips-picker-chip .chips-picker-chip-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px;
}
.chips-picker-chip .chips-picker-chip-x {
  all: unset;
  cursor: pointer;
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  opacity: 0.7;
  transition: opacity 0.15s, background 0.15s;
}
.chips-picker-chip .chips-picker-chip-x i {
  font-size: 12px;
}
.chips-picker-chip .chips-picker-chip-x:hover {
  opacity: 1;
  background: rgba(0, 0, 0, 0.08);
}

.chips-picker-input {
  flex: 1 1 120px;
  min-width: 120px;
  border: none;
  outline: none;
  background: transparent;
  padding: 4px 4px;
  font-size: 0.85rem;
  color: #111827;
}
.chips-picker-input::-moz-placeholder {
  color: #9ca3af;
}
.chips-picker-input::placeholder {
  color: #9ca3af;
}
.chips-picker-input:disabled {
  cursor: not-allowed;
}

.chips-picker-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 30;
  background: #fff;
  border: 1.5px solid #e5e7eb;
  border-radius: 11px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
  max-height: 280px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.chips-picker-list {
  overflow-y: auto;
  padding: 6px;
  flex: 1 1 auto;
}

.chips-picker-option {
  all: unset;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 8px;
  cursor: pointer;
  width: 100%;
  box-sizing: border-box;
  transition: background 0.12s;
}
.chips-picker-option:hover, .chips-picker-option.is-active {
  background: #f3f4f6;
}
.chips-picker-option .chips-picker-option-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.chips-picker-option .chips-picker-option-body {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.chips-picker-option .chips-picker-option-name {
  font-weight: 600;
  font-size: 0.87rem;
  color: #111827;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chips-picker-option .chips-picker-option-desc {
  font-size: 0.75rem;
  color: #6b7280;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chips-picker-option .chips-picker-option-add {
  color: #9ca3af;
  font-size: 16px;
  flex-shrink: 0;
}
.chips-picker-option:hover .chips-picker-option-add, .chips-picker-option.is-active .chips-picker-option-add {
  color: #4f46e5;
}

.chips-picker-empty {
  padding: 22px 16px;
  text-align: center;
  color: #6b7280;
  font-size: 0.82rem;
}
.chips-picker-empty i {
  font-size: 24px;
  color: #d1d5db;
  display: block;
  margin-bottom: 4px;
}

.chips-picker-create {
  all: unset;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 14px;
  border-top: 1px solid #f3f4f6;
  background: #f9fafb;
  color: #4f46e5;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.12s;
}
.chips-picker-create i {
  font-size: 16px;
}
.chips-picker-create strong {
  font-weight: 700;
}
.chips-picker-create:hover {
  background: #eef2ff;
}
.chips-picker-create.is-loading {
  opacity: 0.65;
  cursor: wait;
}
.chips-picker-create:disabled {
  cursor: not-allowed;
}

/* État de chargement utilisé dans le wizard contact */
.marketing-lists-loading .spin {
  display: inline-block;
  animation: wiz-spin 1s linear infinite;
}

@keyframes wiz-spin {
  to {
    transform: rotate(360deg);
  }
}
/* ─── Tags input ─────────────────────────────────────────────── */
.tags-input .tags-input-field {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  min-height: 50px;
  padding: 8px 10px;
  border: 1.5px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
  cursor: text;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.tags-input .tags-input-field:focus-within {
  border-color: #4f46e5;
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.12);
}
.tags-input .tags-input-list {
  display: contents;
}
.tags-input .tags-input-control {
  flex: 1 1 140px;
  border: none;
  outline: none;
  background: transparent;
  font-size: 0.88rem;
  padding: 4px;
  min-width: 120px;
}
.tags-input .tags-input-control::-moz-placeholder {
  color: #c4c9d2;
}
.tags-input .tags-input-control::placeholder {
  color: #c4c9d2;
}
.tags-input .tags-input-suggestions {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.tags-input .tags-input-suggestions .tags-input-suggestions-label {
  font-size: 0.72rem;
  color: #6b7280;
  font-weight: 600;
  margin-right: 4px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 4px 4px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  background: #eef2ff;
  color: #4f46e5;
  border: none;
  cursor: default;
}
.tag-chip .tag-chip-remove {
  width: 18px;
  height: 18px;
  border: none;
  background: rgba(0, 0, 0, 0.08);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: inherit;
  cursor: pointer;
  transition: background 0.15s;
}
.tag-chip .tag-chip-remove i {
  font-size: 12px;
}
.tag-chip .tag-chip-remove:hover {
  background: rgba(0, 0, 0, 0.18);
}

.tag-chip-suggest {
  background: #f3f4f6;
  color: #4b5563;
  border: 1px dashed #d1d5db;
  cursor: pointer;
  padding: 4px 10px;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.tag-chip-suggest:hover {
  background: #eef2ff;
  color: #4f46e5;
  border-color: #4f46e5;
}

/* ─── Toggle (switch active/inactive) ────────────────────────── */
.wizard-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  background: #fff;
  border: 1.5px solid #e5e7eb;
  border-radius: 12px;
}
.wizard-toggle .wizard-toggle-text {
  flex: 1;
}
.wizard-toggle .wizard-toggle-text .wizard-toggle-title {
  font-weight: 600;
  font-size: 0.9rem;
  color: #111827;
}
.wizard-toggle .wizard-toggle-text .wizard-toggle-desc {
  font-size: 0.78rem;
  color: #6b7280;
  margin-top: 2px;
}
.wizard-toggle input[type=checkbox] {
  -webkit-appearance: none;
     -moz-appearance: none;
          appearance: none;
  width: 44px;
  height: 24px;
  background: #d1d5db;
  border-radius: 999px;
  position: relative;
  cursor: pointer;
  transition: background 0.2s;
  flex-shrink: 0;
}
.wizard-toggle input[type=checkbox]::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}
.wizard-toggle input[type=checkbox]:checked {
  background: #4f46e5;
}
.wizard-toggle input[type=checkbox]:checked::after {
  transform: translateX(20px);
}
.wizard-toggle input[type=checkbox]:focus-visible {
  outline: 2px solid rgba(79, 70, 229, 0.4);
  outline-offset: 2px;
}

/* ─── Lignes produits dynamiques (deals) ─────────────────────── */
.wizard-line-items {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.wizard-line-item {
  display: grid;
  grid-template-columns: minmax(0, 2fr) 80px 100px 80px 36px;
  gap: 8px;
  align-items: center;
  background: #fff;
  border: 1.5px solid #e5e7eb;
  border-radius: 11px;
  padding: 10px;
  /* empêche les enfants flex/inline-flex (picker, inputs) de pousser la grille */
}
.wizard-line-item > * {
  min-width: 0;
}
.wizard-line-item .form-control,
.wizard-line-item .form-select {
  font-size: 0.82rem;
  padding: 0.4rem 0.65rem;
  border-radius: 8px;
}
.wizard-line-item .wizard-line-product-picker {
  min-width: 0;
  max-width: 100%;
}
.wizard-line-item .wizard-line-product-picker .entity-picker-trigger, .wizard-line-item .wizard-line-product-picker .client-picker-trigger {
  width: 100%;
  min-width: 0;
  padding: 4px 10px 4px 12px;
  border-radius: 8px;
  min-height: 34px;
}
.wizard-line-item .wizard-line-product-picker .entity-picker-trigger-content, .wizard-line-item .wizard-line-product-picker .client-picker-trigger-content {
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
}
.wizard-line-item .wizard-line-product-picker .entity-picker-name, .wizard-line-item .wizard-line-product-picker .client-picker-name {
  font-size: 0.82rem;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: block;
}
.wizard-line-item .wizard-line-product-picker .entity-picker-placeholder, .wizard-line-item .wizard-line-product-picker .client-picker-placeholder {
  font-size: 0.82rem;
}
.wizard-line-item .wizard-line-product-picker .entity-picker-trigger-caret, .wizard-line-item .wizard-line-product-picker .client-picker-trigger-caret {
  font-size: 16px;
  flex-shrink: 0;
}
.wizard-line-item .wizard-line-product-picker .entity-picker-clear, .wizard-line-item .wizard-line-product-picker .client-picker-clear {
  flex-shrink: 0;
}
.wizard-line-item .wizard-line-remove {
  width: 30px;
  height: 30px;
  border: none;
  background: #fef2f2;
  color: #ef4444;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s;
}
.wizard-line-item .wizard-line-remove:hover {
  background: #fee2e2;
}

.wizard-line-add {
  align-self: flex-start;
  background: #f5f3ff;
  color: #4f46e5;
  border: 1px dashed #c7d2fe;
  border-radius: 10px;
  padding: 8px 14px;
  font-size: 0.82rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.wizard-line-add:hover {
  background: #ede9fe;
  border-color: #4f46e5;
}

.wizard-totals {
  margin-top: 18px;
  padding: 14px 18px;
  background: linear-gradient(135deg, #f5f3ff 0%, #eef2ff 100%);
  border-radius: 12px;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 14px;
}
.wizard-totals .wizard-total {
  text-align: center;
}
.wizard-totals .wizard-total .wizard-total-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #6b7280;
  font-weight: 600;
}
.wizard-totals .wizard-total .wizard-total-value {
  font-size: 1.1rem;
  font-weight: 700;
  color: #111827;
  margin-top: 4px;
}
.wizard-totals .wizard-total.is-grand .wizard-total-value {
  color: #4f46e5;
  font-size: 1.25rem;
}

/* ─── Responsive ─────────────────────────────────────────────── */
@media (max-width: 768px) {
  .wizard-offcanvas.wizard-offcanvas-wide.offcanvas, .wizard-offcanvas.offcanvas.contact-offcanvas-wide, .wizard-offcanvas-wide.offcanvas.contact-offcanvas, .offcanvas.contact-offcanvas.contact-offcanvas-wide {
    width: calc(100vw - 28px);
  }
  .wizard-mode-cards, .company-mode-cards {
    grid-template-columns: 1fr;
  }
  .wizard-step .wizard-step-label {
    display: none;
  }
  .wizard-offcanvas-body, .contact-offcanvas-body {
    padding: 20px 18px;
  }
  .wizard-offcanvas-header, .contact-offcanvas-header {
    padding: 18px 20px 0;
  }
  .wizard-offcanvas-footer, .contact-offcanvas-footer {
    padding: 14px 18px;
  }
  .wizard-line-item {
    grid-template-columns: 1fr 1fr;
    grid-template-areas: "name name" "qty price" "discount remove";
  }
  .wizard-totals {
    grid-template-columns: 1fr;
  }
}
/* =================================================================
   ENTITY DETAILS LAYOUT — mutualisé contact_details / client_details
   ================================================================= */
/* Avatar palette (sober but colored) */
/* ── Conteneur 3 colonnes ───────────────────────────────────── */
.entity-details-layout {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr) 340px;
  gap: 1.5rem;
  align-items: start;
  padding-bottom: 2rem;
}
@media (max-width: 1280px) {
  .entity-details-layout {
    grid-template-columns: 320px minmax(0, 1fr) 320px;
    gap: 1.25rem;
  }
}
@media (max-width: 1100px) {
  .entity-details-layout {
    grid-template-columns: 1fr 1fr;
  }
  .entity-details-layout .entity-details__col--right {
    grid-column: 1/-1;
  }
}
@media (max-width: 820px) {
  .entity-details-layout {
    grid-template-columns: 1fr;
  }
}

.entity-details__col {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-width: 0;
}
.entity-details__col--center {
  gap: 1.25rem;
}

/* Top breadcrumb / back link */
.entity-details__top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}
.entity-details__top .back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #6b7280;
  text-decoration: none;
  font-size: 0.85rem;
}
.entity-details__top .back-link:hover {
  color: #4f46e5;
}

/* ── Carte profil (col gauche) ──────────────────────────────── */
.entity-profile-card {
  background: #ffffff;
  border: 1px solid #e6e8ee;
  border-radius: 14px;
  padding: 1.25rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.entity-profile-card__head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 1rem;
}

.entity-profile-card__identity {
  flex: 1;
  min-width: 0;
}

.entity-profile-card__name {
  font-size: 1.1rem;
  font-weight: 700;
  color: #111827;
  margin: 0;
  line-height: 1.2;
}

.entity-profile-card__subtitle {
  margin: 2px 0 0;
  font-size: 0.82rem;
  color: #6b7280;
  line-height: 1.35;
}

.entity-profile-card__email {
  margin: 4px 0 0;
  font-size: 0.82rem;
}
.entity-profile-card__email a {
  color: #4f46e5;
  text-decoration: none;
}
.entity-profile-card__email a:hover {
  text-decoration: underline;
}

/* Avatar */
.entity-avatar {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.02em;
  background: linear-gradient(135deg, #3b82f6 0%, #6366f1 100%);
}
.entity-avatar--lg {
  width: 64px;
  height: 64px;
  font-size: 1.15rem;
}
.entity-avatar--sm {
  width: 36px;
  height: 36px;
  font-size: 0.8rem;
}
.entity-avatar--blue {
  background: linear-gradient(135deg, #3b82f6 0%, #6366f1 100%);
}
.entity-avatar--purple {
  background: linear-gradient(135deg, #8b5cf6 0%, #a855f7 100%);
}
.entity-avatar--green {
  background: linear-gradient(135deg, #10b981 0%, #14b8a6 100%);
}
.entity-avatar--orange {
  background: linear-gradient(135deg, #f59e0b 0%, #f97316 100%);
}
.entity-avatar--pink {
  background: linear-gradient(135deg, #ec4899 0%, #f472b6 100%);
}
.entity-avatar--teal {
  background: linear-gradient(135deg, #06b6d4 0%, #0ea5e9 100%);
}

/* Quick actions row */
.entity-quick-actions {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  padding-top: 0.75rem;
  border-top: 1px solid #eef0f4;
}

.entity-quick-btn {
  all: unset;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 4px;
  border-radius: 10px;
  font-size: 0.68rem;
  color: #6b7280;
  transition: background 0.15s, color 0.15s;
}
.entity-quick-btn i {
  font-size: 18px;
  color: #111827;
}
.entity-quick-btn:hover {
  background: #eef2ff;
  color: #4f46e5;
}
.entity-quick-btn:hover i {
  color: #4f46e5;
}
.entity-quick-btn:focus-visible {
  outline: 2px solid #4f46e5;
  outline-offset: 2px;
}

/* ── Liste d'attributs ──────────────────────────────────────── */
.entity-attribute-list {
  background: #ffffff;
  border: 1px solid #e6e8ee;
  border-radius: 14px;
  padding: 0.25rem 0.25rem;
  margin: 0;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  display: flex;
  flex-direction: column;
}

.entity-attribute {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 12px;
  align-items: center;
  padding: 0.65rem 0.85rem;
  border-bottom: 1px solid #eef0f4;
  border-radius: 8px;
}
.entity-attribute:last-child {
  border-bottom: none;
}
.entity-attribute[data-attr-editable="1"] {
  cursor: pointer;
}
.entity-attribute[data-attr-editable="1"]:hover {
  background: #fafbff;
}

.entity-attribute__label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.76rem;
  font-weight: 500;
  color: #6b7280;
  margin: 0;
  text-transform: none;
}
.entity-attribute__label i {
  font-size: 15px;
  color: #9ca3af;
}

.entity-attribute__value {
  margin: 0;
  font-size: 0.85rem;
  color: #111827;
  word-break: break-word;
  line-height: 1.4;
}
.entity-attribute__value a {
  color: #4f46e5;
  text-decoration: none;
}
.entity-attribute__value a:hover {
  text-decoration: underline;
}
.entity-attribute__value .entity-attribute__placeholder {
  color: #9ca3af;
}
.entity-attribute__value .badge {
  font-weight: 500;
}

.entity-attribute__editing .entity-attribute__value input,
.entity-attribute__editing .entity-attribute__value select,
.entity-attribute__editing .entity-attribute__value textarea {
  width: 100%;
  font-size: 0.85rem;
  padding: 0.35rem 0.5rem;
  border-radius: 8px;
  border: 1.5px solid #4f46e5;
  background: #fff;
  outline: none;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
}

/* ── Section latérale (tags / listes marketing) ─────────────── */
.entity-side-section {
  background: #ffffff;
  border: 1px solid #e6e8ee;
  border-radius: 14px;
  padding: 1rem 1.1rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.entity-side-section__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.entity-side-section__title {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 700;
  color: #111827;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.entity-side-section__title i {
  font-size: 16px;
  color: #6b7280;
}

.entity-side-section__counter {
  margin-left: 4px;
}

.entity-side-section__edit {
  all: unset;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #6b7280;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.entity-side-section__edit i {
  font-size: 15px;
}
.entity-side-section__edit:hover {
  background: #eef2ff;
  color: #4f46e5;
}

.entity-tags-readonly,
.entity-marketing-readonly {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  min-height: 30px;
}
.entity-tags-readonly .entity-chip,
.entity-marketing-readonly .entity-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}
.entity-tags-readonly .entity-chip .entity-chip__dot,
.entity-marketing-readonly .entity-chip .entity-chip__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
}

/* ── Carte liée (col droite) ────────────────────────────────── */
.entity-related-card {
  background: #ffffff;
  border: 1px solid #e6e8ee;
  border-radius: 14px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  overflow: hidden;
}

.entity-related-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1rem;
  cursor: pointer;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
}
.entity-related-card__header:hover {
  background: #fafbff;
}

.entity-related-card__title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 700;
  color: #111827;
}
.entity-related-card__title i {
  font-size: 16px;
  color: #6b7280;
}

.entity-related-card__count {
  font-size: 0.72rem;
  font-weight: 600;
  color: #6b7280;
  background: #eef0f4;
  padding: 1px 7px;
  border-radius: 999px;
  margin-left: 4px;
}

.entity-related-card__chevron {
  color: #9ca3af;
  font-size: 16px;
  transition: transform 0.2s;
}

.entity-related-card.is-collapsed .entity-related-card__chevron {
  transform: rotate(-90deg);
}
.entity-related-card.is-collapsed .entity-related-card__body {
  display: none;
}

.entity-related-card__body {
  padding: 0 1rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.entity-related-card__empty {
  margin: 0;
  text-align: center;
  padding: 0.75rem 0;
}

/* Inner items used by related cards */
.entity-related-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0.55rem 0.65rem;
  border: 1px solid #eef0f4;
  border-radius: 10px;
  background: #fff;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, background 0.15s;
}
.entity-related-row:hover {
  border-color: #4f46e5;
  background: #eef2ff;
}
.entity-related-row .entity-related-row__title {
  font-weight: 600;
  font-size: 0.85rem;
  color: #111827;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.entity-related-row .entity-related-row__meta {
  font-size: 0.72rem;
  color: #6b7280;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.entity-related-row__body {
  flex: 1;
  min-width: 0;
}

/* Company info card (col droite contact) */
.entity-company-block {
  padding: 0 1rem 1rem;
}
.entity-company-block .entity-company__row {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 8px;
  font-size: 0.82rem;
  padding: 0.35rem 0;
  border-bottom: 1px dashed #eef0f4;
}
.entity-company-block .entity-company__row:last-child {
  border-bottom: none;
}
.entity-company-block .entity-company__row .entity-company__label {
  color: #6b7280;
  font-size: 0.75rem;
}
.entity-company-block .entity-company__row .entity-company__value {
  color: #111827;
  word-break: break-word;
}
.entity-company-block .entity-company__row a {
  color: #4f46e5;
  text-decoration: none;
}
.entity-company-block .entity-company__row a:hover {
  text-decoration: underline;
}
.entity-company-block .entity-company__head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0.25rem 0 0.85rem;
  border-bottom: 1px solid #eef0f4;
  margin-bottom: 0.65rem;
}
.entity-company-block .entity-company__head .entity-company__name {
  font-weight: 700;
  font-size: 0.95rem;
  color: #111827;
  line-height: 1.2;
  text-decoration: none;
}
.entity-company-block .entity-company__head .entity-company__name:hover {
  color: #4f46e5;
}
.entity-company-block .entity-company__head .entity-company__sector {
  font-size: 0.75rem;
  color: #6b7280;
}

/* KPIs (col droite client) */
.entity-kpis {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  padding: 0 1rem 1rem;
}

.entity-kpi {
  background: linear-gradient(135deg, #f5f7ff 0%, #fafbff 100%);
  border: 1px solid #eef0f4;
  border-radius: 10px;
  padding: 0.75rem 0.85rem;
}
.entity-kpi__label {
  display: block;
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #6b7280;
  margin-bottom: 4px;
}
.entity-kpi__value {
  font-size: 1.05rem;
  font-weight: 700;
  color: #111827;
  line-height: 1.1;
}
.entity-kpi__hint {
  font-size: 0.7rem;
  color: #9ca3af;
  margin-top: 3px;
}

/* Deal mini-card */
.entity-deal-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 0.75rem;
  border: 1px solid #eef0f4;
  border-radius: 10px;
  background: #fff;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, transform 0.1s;
}
.entity-deal-card:hover {
  border-color: #4f46e5;
  transform: translateY(-1px);
}
.entity-deal-card__title {
  font-weight: 600;
  font-size: 0.85rem;
  color: #111827;
}
.entity-deal-card__amount {
  font-weight: 700;
  color: #4f46e5;
  font-size: 0.92rem;
}
.entity-deal-card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.7rem;
  color: #6b7280;
}
.entity-deal-card .badge {
  font-weight: 500;
  font-size: 0.68rem;
}

/* ── Activité - panneau central ─────────────────────────────── */
.entity-activity {
  background: #ffffff;
  border: 1px solid #e6e8ee;
  border-radius: 14px;
  padding: 0;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  overflow: hidden;
}

.entity-activity__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 0.65rem 1rem;
  border-bottom: 1px solid #eef0f4;
  background: #fff;
  flex-wrap: wrap;
}

.entity-activity__tabs {
  display: flex;
  gap: 0;
  flex: 1;
  flex-wrap: wrap;
  align-items: center;
}

.entity-activity__tab {
  all: unset;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0.55rem 0.85rem;
  font-size: 0.85rem;
  color: #6b7280;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
  white-space: nowrap;
}
.entity-activity__tab i {
  font-size: 16px;
}
.entity-activity__tab:hover {
  color: #111827;
}
.entity-activity__tab.is-active {
  color: #4f46e5;
  border-bottom-color: #4f46e5;
}

.entity-activity__add {
  white-space: nowrap;
}

/* Onglets supplémentaires (dropdown "...") */
.entity-activity__more {
  position: relative;
  display: inline-flex;
}
.entity-activity__more .entity-activity__more-trigger[aria-expanded=true] {
  color: #111827;
  background: rgba(0, 0, 0, 0.03);
}

.entity-activity__more-menu {
  min-width: 180px;
  padding: 0.35rem;
  border-radius: 10px;
  border: 1px solid #eef0f4;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
}
.entity-activity__more-menu .entity-activity__more-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0.5rem 0.65rem;
  border-radius: 6px;
  font-size: 0.85rem;
  color: #111827;
  cursor: pointer;
  background: transparent;
  border: 0;
  width: 100%;
}
.entity-activity__more-menu .entity-activity__more-item i {
  font-size: 16px;
  color: #6b7280;
}
.entity-activity__more-menu .entity-activity__more-item:hover, .entity-activity__more-menu .entity-activity__more-item:focus {
  background: rgba(99, 102, 241, 0.08);
  color: #4f46e5;
}
.entity-activity__more-menu .entity-activity__more-item:hover i, .entity-activity__more-menu .entity-activity__more-item:focus i {
  color: #4f46e5;
}
.entity-activity__more-menu .entity-activity__more-item.is-active {
  background: rgba(99, 102, 241, 0.12);
  color: #4f46e5;
  font-weight: 600;
}
.entity-activity__more-menu .entity-activity__more-item.is-active i {
  color: #4f46e5;
}

.entity-activity__pane {
  display: none;
  padding: 1.25rem 1rem;
}

.entity-activity__pane.is-active {
  display: block;
}

.entity-activity__section-title {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #6b7280;
  margin: 0 0 0.75rem;
}

/* Overview rows */
.entity-overview {
  margin-bottom: 1.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid #eef0f4;
}

.entity-overview__group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.entity-overview__row {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 12px;
  align-items: start;
  padding: 0.35rem 0;
}

.entity-overview__label {
  font-size: 0.8rem;
  color: #6b7280;
}

.entity-overview__value {
  margin: 0;
  font-size: 0.87rem;
  color: #111827;
  line-height: 1.45;
}
.entity-overview__value a {
  color: #4f46e5;
  text-decoration: none;
}
.entity-overview__value a:hover {
  text-decoration: underline;
}

.entity-overview__about {
  color: #111827;
}

/* Filtres timeline */
.entity-activity__filters {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.entity-activity__search {
  position: relative;
}
.entity-activity__search i {
  position: absolute;
  top: 50%;
  left: 12px;
  transform: translateY(-50%);
  color: #9ca3af;
  font-size: 16px;
}
.entity-activity__search .form-control {
  padding-left: 36px;
  border-radius: 10px;
  border-color: #e6e8ee;
}

.entity-activity__pills {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.entity-activity__pill {
  all: unset;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  font-size: 0.78rem;
  color: #6b7280;
  background: #f3f4f6;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.entity-activity__pill:hover {
  background: #e5e7eb;
  color: #111827;
}
.entity-activity__pill.is-active {
  background: #4f46e5;
  color: #fff;
}

/* ── Deals full list ─────────────────────────────────────────── */
.entity-deals-full {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.entity-deals-full .entity-deal-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0.85rem 1rem;
  border: 1px solid #eef0f4;
  border-radius: 10px;
  background: #fff;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s;
}
.entity-deals-full .entity-deal-row:hover {
  border-color: #4f46e5;
}
.entity-deals-full .entity-deal-row__icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #eef2ff;
  color: #4f46e5;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.entity-deals-full .entity-deal-row__icon i {
  font-size: 18px;
}
.entity-deals-full .entity-deal-row__body {
  flex: 1;
  min-width: 0;
}
.entity-deals-full .entity-deal-row__title {
  font-weight: 600;
  font-size: 0.9rem;
  color: #111827;
}
.entity-deals-full .entity-deal-row__meta {
  font-size: 0.75rem;
  color: #6b7280;
}
.entity-deals-full .entity-deal-row__amount {
  font-weight: 700;
  color: #4f46e5;
}

/* ── Activity wizard offcanvas (cartes-types) ──────────────── */
.activity-type-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
@media (max-width: 540px) {
  .activity-type-grid {
    grid-template-columns: 1fr;
  }
}

.activity-type-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 14px;
  background: #fff;
  border: 1.5px solid #e6e8ee;
  border-radius: 14px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, transform 0.1s;
}
.activity-type-card:hover {
  border-color: #4f46e5;
  background: #fafbff;
}
.activity-type-card.is-selected {
  border-color: #4f46e5;
  background: #eef2ff;
}
.activity-type-card.is-selected .activity-type-card__check {
  opacity: 1;
  transform: scale(1);
}
.activity-type-card__icon {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.activity-type-card__icon i {
  font-size: 18px;
}
.activity-type-card__body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.activity-type-card__title {
  font-weight: 700;
  font-size: 0.9rem;
  color: #111827;
}
.activity-type-card__desc {
  font-size: 0.75rem;
  color: #6b7280;
}
.activity-type-card__check {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 18px;
  color: #4f46e5;
  opacity: 0;
  transform: scale(0.5);
  transition: opacity 0.15s, transform 0.15s;
}

/* ── Campaign emails list (subscribed campaigns) ───────────── */
.campaign-emails-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.campaign-emails-list .campaign-email-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0.65rem 0.85rem;
  border: 1px solid #eef0f4;
  border-radius: 10px;
  background: #fff;
}
.campaign-emails-list .campaign-email-row__title {
  flex: 1;
  font-weight: 600;
  font-size: 0.82rem;
  color: #111827;
}
.campaign-emails-list .campaign-email-row__date {
  font-size: 0.72rem;
  color: #6b7280;
}
.campaign-emails-list .campaign-email-row__metric {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  color: #6b7280;
}
.campaign-emails-list .campaign-email-row__metric i {
  font-size: 13px;
}

/* =================================================================
   ACTIVITY TIMELINE — utilisé sur les pages contact_details / client_details
   ================================================================= */
/* Couleurs accent par type (sober + lisible sur fond pastel) */
.activity-icon--note {
  background: #dbeafe;
  color: #1d4ed8;
}

.activity-icon--email {
  background: #ede9fe;
  color: #6d28d9;
}

.activity-icon--call {
  background: #d1fae5;
  color: #047857;
}

.activity-icon--meeting {
  background: #ffedd5;
  color: #c2410c;
}

.activity-icon--task {
  background: #fef3c7;
  color: #b45309;
}

.activity-icon--system {
  background: #f3f4f6;
  color: #4b5563;
}

/* Container */
.activity-timeline {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.activity-timeline__loading, .activity-timeline__empty {
  text-align: center;
  padding: 1.25rem 0;
}

/* Mois header */
.activity-timeline__month {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #9ca3af;
  margin: 0.75rem 0 0.25rem;
}
.activity-timeline__month::before, .activity-timeline__month::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #e6e8ee;
}

/* Group (un mois) */
.activity-timeline__group {
  position: relative;
  padding-left: 14px;
}
.activity-timeline__group::before {
  content: "";
  position: absolute;
  left: 18px;
  top: 12px;
  bottom: 12px;
  width: 2px;
  background: #e6e8ee;
}

/* Item */
.activity-item {
  position: relative;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  gap: 12px;
  padding: 0.55rem 0;
  align-items: flex-start;
}
.activity-item:hover .activity-item__menu {
  opacity: 1;
}

/* Icône ronde */
.activity-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #f3f4f6;
  color: #4b5563;
  z-index: 1;
  position: relative;
}
.activity-icon i {
  font-size: 17px;
}

.activity-item__body {
  min-width: 0;
  padding-top: 6px;
}

.activity-item__headline {
  font-size: 0.87rem;
  color: #111827;
  line-height: 1.4;
}
.activity-item__headline strong {
  font-weight: 700;
}
.activity-item__headline a {
  color: #111827;
  text-decoration: none;
  font-weight: 600;
}
.activity-item__headline a:hover {
  color: #4f46e5;
  text-decoration: underline;
}
.activity-item__headline .activity-meta {
  color: #6b7280;
  font-weight: 400;
}

.activity-item__detail {
  font-size: 0.82rem;
  color: #6b7280;
  margin-top: 4px;
  line-height: 1.5;
  word-break: break-word;
}

.activity-item__attachments {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.activity-item__attachments a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  font-size: 0.72rem;
  border: 1px solid #e6e8ee;
  border-radius: 999px;
  color: #6b7280;
  text-decoration: none;
  background: #fff;
}
.activity-item__attachments a i {
  font-size: 12px;
}
.activity-item__attachments a:hover {
  color: #4f46e5;
  border-color: #4f46e5;
}

.activity-item__date {
  font-size: 0.72rem;
  color: #9ca3af;
  white-space: nowrap;
  padding-top: 12px;
}

.activity-item__menus {
  display: inline-flex;
  gap: 2px;
  align-items: flex-start;
  padding-top: 8px;
}

.activity-item__menu {
  opacity: 0;
  background: none;
  border: none;
  color: #9ca3af;
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  transition: opacity 0.15s, background 0.15s;
}
.activity-item__menu:hover {
  background: #f3f4f6;
  color: #111827;
}

.activity-item:hover .activity-item__menu {
  opacity: 1;
}

/* Mode compact (utilisé dans l'onglet Aperçu) */
.activity-timeline--compact .activity-item {
  padding: 0.35rem 0;
}
.activity-timeline--compact .activity-item__body {
  padding-top: 4px;
}
.activity-timeline--compact .activity-item__headline {
  font-size: 0.82rem;
}
.activity-timeline--compact .activity-item__detail {
  font-size: 0.77rem;
}
.activity-timeline--compact .activity-item__date {
  font-size: 0.68rem;
  padding-top: 10px;
}

/**
 * Bloc « Produits & totaux » inline dans la page de détails d'une affaire.
 * Reprend l'esthétique du wizard mais adapté à un usage inline (pas de modal).
 */
.quote-builder {
  background: #fff;
  border: 1px solid #eef0f4;
  border-radius: 14px;
  padding: 1.25rem;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}
.quote-builder__head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 1rem;
}
.quote-builder__head h6 {
  margin: 0 0 0.15rem;
  font-size: 1rem;
  font-weight: 700;
  color: #111827;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.quote-builder__head h6 i {
  color: #4f46e5;
}
.quote-builder__head p {
  margin: 0;
  font-size: 0.82rem;
  color: #6b7280;
}
.quote-builder__lines {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.quote-builder__empty {
  text-align: center;
  padding: 2rem 1rem;
  background: #f9fafb;
  border-radius: 10px;
  color: #6b7280;
}
.quote-builder__empty i {
  font-size: 32px;
  color: #d1d5db;
  display: block;
  margin-bottom: 6px;
}
.quote-builder__empty p {
  margin: 0;
  font-size: 0.85rem;
}
.quote-builder__add {
  margin-top: 12px;
  background: #eef2ff;
  color: #4f46e5;
  border: 1px dashed rgba(79, 70, 229, 0.35);
  border-radius: 10px;
  padding: 0.65rem 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.quote-builder__add:hover {
  background: rgba(79, 70, 229, 0.12);
  border-color: #4f46e5;
}
.quote-builder__vat {
  margin-top: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.quote-builder__vat label {
  font-size: 0.82rem;
  color: #6b7280;
  font-weight: 500;
}
.quote-builder__vat-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.quote-builder__totals {
  margin-top: 1.25rem;
  background: #eef2ff;
  border-radius: 12px;
  padding: 1rem;
  container-type: inline-size;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
@container (min-width: 380px) {
  .quote-builder__totals {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
  }
}
.quote-builder__totals .quote-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}
@container (min-width: 380px) {
  .quote-builder__totals .quote-total {
    display: block;
    text-align: center;
  }
}
.quote-builder__totals .quote-total__label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #6b7280;
  margin-bottom: 0;
}
@container (min-width: 380px) {
  .quote-builder__totals .quote-total__label {
    margin-bottom: 0.25rem;
  }
}
.quote-builder__totals .quote-total__value {
  font-size: 1rem;
  font-weight: 600;
  color: #111827;
  white-space: nowrap;
}
@container (min-width: 380px) {
  .quote-builder__totals .quote-total__value {
    font-size: 1.05rem;
  }
}
.quote-builder__totals .quote-total.is-grand .quote-total__value {
  font-size: 1.15rem;
  color: #4f46e5;
}
@container (min-width: 380px) {
  .quote-builder__totals .quote-total.is-grand .quote-total__value {
    font-size: 1.35rem;
  }
}
.quote-builder__qonto {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px dashed #eef0f4;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.quote-builder__qonto-info {
  font-size: 0.82rem;
  color: #6b7280;
  display: flex;
  align-items: center;
  gap: 8px;
}
.quote-builder__qonto-info i {
  font-size: 18px;
}
.quote-builder__quote-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0.5rem 0.85rem;
  background: rgba(34, 197, 94, 0.08);
  border: 1px solid rgba(34, 197, 94, 0.25);
  border-radius: 8px;
  font-size: 0.85rem;
  color: #166534;
}
.quote-builder__quote-status strong {
  color: #14532d;
}
.quote-builder__quote-status a {
  color: #4f46e5;
  text-decoration: underline;
}

.quote-builder__lines {
  container-type: inline-size;
}

.quote-line {
  display: grid;
  align-items: center;
  gap: 6px;
  padding: 6px;
  border-radius: 10px;
  transition: background 0.12s;
  /* Mobile / colonne \u00e9troite : tout empil\u00e9 verticalement */
  grid-template-columns: minmax(0, 1fr) 32px;
  grid-template-areas: "product remove" "qty     qty" "price   price" "discount discount" "total    total";
}
.quote-line:hover {
  background: #f9fafb;
}
.quote-line .form-control {
  font-size: 0.8rem;
  height: 36px;
  padding: 0.35rem 0.5rem;
}
.quote-line__product {
  grid-area: product;
  min-width: 0;
}
.quote-line__product .client-picker {
  width: 100%;
  min-width: 0;
}
.quote-line__qty {
  grid-area: qty;
}
.quote-line__price {
  grid-area: price;
}
.quote-line__discount {
  grid-area: discount;
}
.quote-line__total {
  grid-area: total;
  font-size: 0.85rem;
  font-weight: 600;
  color: #111827;
  white-space: nowrap;
  padding: 4px 6px;
  text-align: right;
}
.quote-line__remove {
  grid-area: remove;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: rgba(239, 68, 68, 0.08);
  color: #ef4444;
  border: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s;
}
.quote-line__remove:hover {
  background: rgba(239, 68, 68, 0.16);
}
.quote-line__remove i {
  font-size: 14px;
}
.quote-line {
  /* Largeur moyenne : produit sur ligne 1, champs sur ligne 2 */
}
@container (min-width: 360px) {
  .quote-line {
    grid-template-columns: 64px minmax(0, 1fr) 70px minmax(0, 1fr) 32px;
    grid-template-areas: "product  product  product  product  remove" "qty      price    discount total    total";
  }
  .quote-line__total {
    text-align: right;
    padding: 0;
  }
}
.quote-line {
  /* Large : tout sur une seule ligne */
}
@container (min-width: 720px) {
  .quote-line {
    grid-template-columns: minmax(0, 2.4fr) 70px 100px 70px 110px 32px;
    grid-template-areas: "product qty price discount total remove";
  }
  .quote-line__total {
    text-align: right;
  }
}

/* pages */
.dash-root {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.dash-grid {
  display: grid;
  gap: 14px;
  height: 100%;
  align-content: stretch;
}
.dash-grid--kpis {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.dash-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}
.dash-toolbar__title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #6b7280;
}
.dash-toolbar__title i {
  font-size: 18px;
  color: #9ca3af;
}
.dash-toolbar__title span {
  font-weight: 500;
}
.dash-toolbar__actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.dash-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid #e5e7eb;
  background: #ffffff;
  color: #111827;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.dash-btn i {
  font-size: 16px;
  color: #6b7280;
  transition: color 0.18s ease;
}
.dash-btn:hover {
  border-color: rgba(59, 130, 246, 0.35);
  color: #3b82f6;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
}
.dash-btn:hover i {
  color: #3b82f6;
}
.dash-btn--ghost {
  background: transparent;
  box-shadow: none;
  border-color: transparent;
  color: #6b7280;
}
.dash-btn--ghost:hover {
  background: #ffffff;
  border-color: #e5e7eb;
  color: #111827;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.dash-btn--primary {
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  border-color: transparent;
  color: #fff;
}
.dash-btn--primary i {
  color: #fff;
}
.dash-btn--primary:hover {
  color: #fff;
  box-shadow: 0 6px 14px rgba(59, 130, 246, 0.35);
}

.grid-stack {
  background: transparent;
}
.grid-stack > .grid-stack-item > .grid-stack-item-content {
  inset: 6px !important;
  overflow: hidden;
  background: transparent;
  border: 0;
}
.grid-stack .ui-resizable-handle {
  opacity: 0;
  transition: opacity 0.18s ease;
}
.grid-stack > .grid-stack-item:hover .ui-resizable-handle {
  opacity: 1;
}
.grid-stack .ui-resizable-se {
  right: 4px;
  bottom: 4px;
  width: 14px;
  height: 14px;
  background: none;
  transform: rotate(45deg);
}
.grid-stack .ui-resizable-se::after {
  content: "";
  position: absolute;
  inset: 0;
  border-right: 2px solid #9ca3af;
  border-bottom: 2px solid #9ca3af;
  border-bottom-right-radius: 3px;
}
.grid-stack .grid-stack-placeholder > .placeholder-content {
  background: rgba(59, 130, 246, 0.08);
  border: 2px dashed rgba(59, 130, 246, 0.4);
  border-radius: 16px;
  inset: 6px !important;
}

body.dash-is-dragging {
  cursor: grabbing !important;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
}

.dash-widget {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  overflow: hidden;
  transition: box-shadow 0.18s ease, border-color 0.18s ease;
}
.dash-widget:hover {
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
}
.dash-widget__header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 20px 12px;
  flex-shrink: 0;
  position: relative;
}
.dash-widget__drag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  color: #9ca3af;
  cursor: grab;
  transition: background 0.18s ease, color 0.18s ease;
  flex-shrink: 0;
}
.dash-widget__drag i {
  font-size: 16px;
}
.dash-widget__drag:hover {
  background: #f8fafc;
  color: #3b82f6;
}
.dash-widget__drag:active {
  cursor: grabbing;
}
.dash-widget__title {
  margin: 0;
  font-size: 14.5px;
  font-weight: 600;
  color: #111827;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}
.dash-widget__title i {
  font-size: 17px;
  color: #6b7280;
  flex-shrink: 0;
}
.dash-widget__title span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dash-widget__actions {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
.dash-widget__action-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12.5px;
  color: #3b82f6;
  text-decoration: none;
  font-weight: 500;
  padding: 4px 8px;
  border-radius: 6px;
  transition: background 0.18s ease;
}
.dash-widget__action-link:hover {
  background: rgba(59, 130, 246, 0.08);
}
.dash-widget__action-link i {
  font-size: 14px;
}
.dash-widget__menu-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  color: #6b7280;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease;
}
.dash-widget__menu-btn i {
  font-size: 17px;
}
.dash-widget__menu-btn:hover {
  background: #f8fafc;
  color: #111827;
}
.dash-widget__menu-btn.is-open {
  background: #f8fafc;
  color: #111827;
}
.dash-widget__menu {
  position: absolute;
  top: 44px;
  right: 12px;
  min-width: 200px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
  padding: 6px;
  z-index: 50;
  display: none;
}
.dash-widget__menu.is-open {
  display: block;
}
.dash-widget__menu button {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: none;
  background: transparent;
  font-size: 13px;
  color: #111827;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease;
  text-align: left;
}
.dash-widget__menu button i {
  font-size: 16px;
  color: #6b7280;
}
.dash-widget__menu button:hover {
  background: #f8fafc;
  color: #3b82f6;
}
.dash-widget__menu button:hover i {
  color: #3b82f6;
}
.dash-widget__menu button.is-danger:hover {
  background: rgba(239, 68, 68, 0.08);
  color: #ef4444;
}
.dash-widget__menu button.is-danger:hover i {
  color: #ef4444;
}
.dash-widget__body {
  flex: 1;
  min-height: 0;
  padding: 10px 20px 20px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.dash-widget__body > *:only-child {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.dash-widget__body--flush {
  padding: 0;
}
.dash-widget__body--scroll {
  overflow-y: auto;
}
.dash-widget__body.dash-grid {
  display: grid;
}
.dash-widget__body.dash-grid > *:only-child {
  display: block;
}
.dash-widget.is-dragging {
  opacity: 0.85;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.18);
}

.dash-picker-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 24px;
  animation: dashFade 0.18s ease;
}

.dash-picker {
  background: #ffffff;
  border-radius: 18px;
  width: 100%;
  max-width: 720px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 30px 60px rgba(15, 23, 42, 0.25);
  overflow: hidden;
  animation: dashRise 0.22s cubic-bezier(0.2, 0.8, 0.3, 1);
}
.dash-picker__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 22px;
  border-bottom: 1px solid #eef0f3;
}
.dash-picker__header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: #111827;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.dash-picker__header h3 i {
  color: #3b82f6;
}
.dash-picker__close {
  background: transparent;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #6b7280;
  transition: background 0.18s ease, color 0.18s ease;
}
.dash-picker__close:hover {
  background: #f8fafc;
  color: #111827;
}
.dash-picker__close i {
  font-size: 18px;
}
.dash-picker__body {
  padding: 18px 22px 22px;
  overflow-y: auto;
}
.dash-picker__empty {
  text-align: center;
  padding: 40px 20px;
  color: #6b7280;
  font-size: 13.5px;
}
.dash-picker__empty i {
  font-size: 32px;
  color: #9ca3af;
  display: block;
  margin-bottom: 10px;
}
.dash-picker__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}

.dash-picker-card {
  text-align: left;
  border: 1px solid #e5e7eb;
  background: #ffffff;
  border-radius: 14px;
  padding: 14px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}
.dash-picker-card:hover {
  border-color: rgba(59, 130, 246, 0.4);
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
  transform: translateY(-1px);
}
.dash-picker-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.dash-picker-card__icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, #eff6ff, #dbeafe);
  color: #1d4ed8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.dash-picker-card__icon i {
  font-size: 18px;
}
.dash-picker-card__add {
  font-size: 12px;
  font-weight: 600;
  color: #3b82f6;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}
.dash-picker-card__add i {
  font-size: 14px;
}
.dash-picker-card__title {
  margin: 6px 0 0;
  font-size: 14px;
  font-weight: 600;
  color: #111827;
}
.dash-picker-card__desc {
  margin: 0;
  font-size: 12.5px;
  color: #6b7280;
  line-height: 1.4;
}

.dash-save-indicator {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-left: 4px solid #10b981;
  padding: 10px 16px;
  border-radius: 12px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #111827;
  z-index: 900;
  animation: dashRise 0.22s ease;
}
.dash-save-indicator i {
  color: #10b981;
  font-size: 18px;
}

@keyframes dashFade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@keyframes dashRise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.gradient-rose-muted, .gradient-slate, .gradient-cyan, .gradient-rose, .gradient-amber, .gradient-violet, .gradient-emerald, .gradient-blue {
  background-image: linear-gradient(135deg, var(--g-from), var(--g-to));
}

.gradient-blue {
  --g-from:#3b82f6;
  --g-to:#1d4ed8;
  color: #fff;
}

.gradient-emerald {
  --g-from:#10b981;
  --g-to:#047857;
  color: #fff;
}

.gradient-violet {
  --g-from:#8b5cf6;
  --g-to:#6d28d9;
  color: #fff;
}

.gradient-amber {
  --g-from:#f59e0b;
  --g-to:#b45309;
  color: #fff;
}

.gradient-rose {
  --g-from:#f43f5e;
  --g-to:#be123c;
  color: #fff;
}

.gradient-cyan {
  --g-from:#06b6d4;
  --g-to:#0e7490;
  color: #fff;
}

.gradient-slate {
  --g-from:#94a3b8;
  --g-to:#475569;
  color: #fff;
}

.gradient-rose-muted {
  --g-from:#fecaca;
  --g-to:#f87171;
  color: #fff;
}

.dash-kpi-card {
  position: relative;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  padding: 16px 18px 14px;
  overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  min-height: 110px;
  display: flex;
  flex-direction: column;
}
.dash-kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
  border-color: #d1d5db;
}
.dash-kpi-card.is-skeleton {
  background: linear-gradient(110deg, #f3f4f6 30%, #e5e7eb 50%, #f3f4f6 70%);
  background-size: 200% 100%;
  animation: dashSkeleton 1.4s linear infinite;
  border-color: transparent;
  min-height: 110px;
}
.dash-kpi-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.dash-kpi-card__body {
  flex: 1;
}
.dash-kpi-card__spark {
  position: absolute;
  right: 14px;
  bottom: 12px;
  color: #3b82f6;
  opacity: 0.55;
  pointer-events: none;
}

.dash-kpi-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.08);
}

.dash-kpi-value {
  font-size: 28px;
  font-weight: 700;
  color: #111827;
  line-height: 1.1;
  letter-spacing: -0.5px;
}

.dash-kpi-label {
  margin-top: 4px;
  font-size: 12.5px;
  font-weight: 500;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.dash-kpi-sub {
  margin-top: 6px;
  display: inline-block;
  font-size: 12px;
  color: #9ca3af;
}

.dash-kpi-delta {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(107, 114, 128, 0.08);
  color: #6b7280;
}
.dash-kpi-delta i {
  font-size: 13px;
}
.dash-kpi-delta.is-up {
  background: rgba(16, 185, 129, 0.12);
  color: rgb(13.5641791045, 156.8358208955, 109.3611940299);
}
.dash-kpi-delta.is-down {
  background: rgba(239, 68, 68, 0.12);
  color: rgb(237.3921182266, 49.2078817734, 49.2078817734);
}
.dash-kpi-delta.is-flat {
  background: rgba(107, 114, 128, 0.1);
  color: #6b7280;
}

.dash-sparkline {
  display: block;
}

.dash-funnel-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex: 1;
  justify-content: space-around;
}

.dash-funnel-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.dash-funnel-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: #111827;
}
.dash-funnel-label .dash-funnel-stage {
  font-weight: 500;
}
.dash-funnel-label .dash-funnel-meta {
  color: #6b7280;
  font-size: 12.5px;
}

.dash-funnel-bar {
  height: 10px;
  background: #f8fafc;
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}

.dash-funnel-bar-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  transition: width 0.4s ease;
}

.dash-seller-list {
  list-style: none;
  margin: 0;
  padding: 0 4px 0 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  counter-reset: sellerRank;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}
.dash-seller-list::-webkit-scrollbar {
  width: 6px;
}
.dash-seller-list::-webkit-scrollbar-thumb {
  background: rgba(15, 23, 42, 0.12);
  border-radius: 6px;
}
.dash-seller-list::-webkit-scrollbar-track {
  background: transparent;
}

.dash-seller {
  display: grid;
  grid-template-columns: 18px 32px 1fr;
  align-items: center;
  gap: 8px;
}

.dash-seller-rank {
  font-size: 11px;
  font-weight: 700;
  color: #9ca3af;
  text-align: center;
}

.dash-seller-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 12px;
  flex-shrink: 0;
}

.dash-seller-body {
  min-width: 0;
}

.dash-seller-head {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.dash-seller-head .dash-seller-name {
  font-weight: 500;
  color: #111827;
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dash-seller-head .dash-seller-amount {
  font-weight: 700;
  color: #111827;
  font-size: 12.5px;
}

.dash-seller-bar {
  height: 6px;
  background: #f8fafc;
  border-radius: 999px;
  overflow: hidden;
  margin-top: 6px;
}

.dash-seller-bar-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  transition: width 0.4s ease;
}

.dash-seller-meta {
  margin-top: 4px;
  font-size: 11.5px;
  color: #9ca3af;
}

.dash-mini-table-wrap {
  overflow-x: auto;
  overflow-y: auto;
  flex: 1;
  padding: 4px 0 0;
  max-height: 100%;
}

.dash-mini-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
}
.dash-mini-table thead th {
  text-align: left;
  font-size: 11.5px;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 10px 16px;
  border-bottom: 1px solid #eef0f3;
  background: #ffffff;
  position: sticky;
  top: 0;
  z-index: 1;
}
.dash-mini-table tbody td {
  padding: 12px 16px;
  border-bottom: 1px solid #eef0f3;
  vertical-align: middle;
  color: #111827;
}
.dash-mini-table tbody tr:last-child td {
  border-bottom: none;
}
.dash-mini-table tbody tr:hover td {
  background: #f8fafc;
}

.dash-mini-cell-amount {
  text-align: right;
  font-weight: 600;
  white-space: nowrap;
}

.dash-mini-cell-stage {
  width: 1%;
  white-space: nowrap;
}

.dash-mini-cell-date {
  width: 1%;
  white-space: nowrap;
}

.dash-mini-link {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  line-height: 1.3;
}
.dash-mini-link:hover .dash-mini-title {
  color: #3b82f6;
}

.dash-mini-title {
  font-weight: 500;
  color: #111827;
}

.dash-mini-sub {
  font-size: 12px;
  color: #6b7280;
  margin-top: 2px;
}

.dash-mini-date {
  display: block;
  font-weight: 500;
}

.dash-mini-diff {
  display: block;
  font-size: 11.5px;
  color: #6b7280;
  margin-top: 2px;
}
.dash-mini-diff.is-soon {
  color: #f59e0b;
  font-weight: 600;
}
.dash-mini-diff.is-overdue {
  color: #ef4444;
  font-weight: 600;
}

.dash-mini-row.is-overdue-row td:first-child {
  box-shadow: inset 3px 0 0 #ef4444;
}

.dash-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.2;
  color: #fff;
  white-space: nowrap;
}
.dash-badge.badge-slate {
  background: linear-gradient(135deg, #94a3b8, #475569);
}
.dash-badge.badge-cyan {
  background: linear-gradient(135deg, #22d3ee, #0e7490);
}
.dash-badge.badge-violet {
  background: linear-gradient(135deg, #a78bfa, #6d28d9);
}
.dash-badge.badge-amber {
  background: linear-gradient(135deg, #fbbf24, #b45309);
}
.dash-badge.badge-rose {
  background: linear-gradient(135deg, #fb7185, #be123c);
}
.dash-badge.badge-emerald {
  background: linear-gradient(135deg, #34d399, #047857);
}
.dash-badge.badge-rose-muted {
  background: linear-gradient(135deg, #fecaca, #f87171);
  color: #7f1d1d;
}

.dash-campaign {
  display: flex;
  flex-direction: column;
  gap: 20px;
  flex: 1;
  justify-content: space-between;
}

.dash-campaign-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}
.dash-campaign-head .dash-campaign-title {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: #111827;
  text-decoration: none;
}
.dash-campaign-head .dash-campaign-title:hover {
  color: #3b82f6;
}
.dash-campaign-head .dash-campaign-sub {
  font-size: 12.5px;
  color: #6b7280;
  margin-top: 2px;
}

.dash-campaign-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
@media (max-width: 600px) {
  .dash-campaign-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.dash-campaign-metric {
  background: #f8fafc;
  border: 1px solid #eef0f3;
  border-radius: 10px;
  padding: 12px 14px;
  transition: border-color 0.18s ease;
}
.dash-campaign-metric.is-info {
  border-color: rgba(59, 130, 246, 0.25);
}
.dash-campaign-metric.is-success {
  border-color: rgba(16, 185, 129, 0.25);
}
.dash-campaign-metric.is-violet {
  border-color: rgba(139, 92, 246, 0.25);
}

.dash-campaign-metric-head {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-weight: 600;
}
.dash-campaign-metric-head i {
  font-size: 14px;
}

.dash-campaign-metric-value {
  margin-top: 6px;
  font-size: 22px;
  font-weight: 700;
  color: #111827;
  line-height: 1.1;
}

.dash-campaign-rates {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.dash-campaign-rate {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.dash-campaign-rate-head {
  display: flex;
  justify-content: space-between;
  font-size: 12.5px;
  color: #111827;
}
.dash-campaign-rate-head strong {
  font-weight: 700;
}

.dash-progress {
  background: #f8fafc;
  border-radius: 999px;
  overflow: hidden;
  height: 8px;
}

.dash-progress-fill {
  height: 100%;
  background: #3b82f6;
  border-radius: 999px;
  transition: width 0.4s ease;
}
.dash-progress-fill.is-success {
  background: linear-gradient(90deg, #34d399, #047857);
}
.dash-progress-fill.is-violet {
  background: linear-gradient(90deg, #a78bfa, #6d28d9);
}
.dash-progress-fill.is-info {
  background: linear-gradient(90deg, #60a5fa, #1d4ed8);
}

.dash-recent-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding-right: 4px;
}
.dash-recent-list::-webkit-scrollbar {
  width: 6px;
}
.dash-recent-list::-webkit-scrollbar-thumb {
  background: rgba(15, 23, 42, 0.12);
  border-radius: 6px;
}
.dash-recent-list::-webkit-scrollbar-track {
  background: transparent;
}

.dash-recent-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  transition: background 0.18s ease;
}
.dash-recent-item:hover {
  background: #f8fafc;
}
.dash-recent-item:hover .dash-recent-title {
  color: #3b82f6;
}

.dash-recent-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 13px;
  flex-shrink: 0;
}

.dash-recent-body {
  flex: 1;
  min-width: 0;
}
.dash-recent-body .dash-recent-title {
  font-size: 13.5px;
  font-weight: 500;
  color: #111827;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dash-recent-body .dash-recent-sub {
  font-size: 12px;
  color: #6b7280;
  margin-top: 1px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dash-recent-meta {
  font-size: 12px;
  font-weight: 600;
  color: #6b7280;
  flex-shrink: 0;
}

.dash-trend {
  position: relative;
  flex: 1;
  min-height: 260px;
}
.dash-trend canvas {
  max-height: 100%;
}

.dash-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #6b7280;
  font-size: 13.5px;
  padding: 24px 20px;
  min-height: 160px;
  gap: 6px;
}
.dash-empty .dash-empty__icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f3f4f6, #e5e7eb);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
  color: #9ca3af;
  font-size: 26px;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.03);
}
.dash-empty .dash-empty__icon.is-info {
  background: linear-gradient(135deg, #dbeafe, #bfdbfe);
  color: #1d4ed8;
}
.dash-empty .dash-empty__icon.is-success {
  background: linear-gradient(135deg, #d1fae5, #a7f3d0);
  color: #047857;
}
.dash-empty .dash-empty__icon.is-amber {
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  color: #b45309;
}
.dash-empty .dash-empty__icon.is-violet {
  background: linear-gradient(135deg, #ede9fe, #ddd6fe);
  color: #6d28d9;
}
.dash-empty .dash-empty__icon.is-rose {
  background: linear-gradient(135deg, #ffe4e6, #fecdd3);
  color: #be123c;
}
.dash-empty .dash-empty__title {
  font-size: 14.5px;
  font-weight: 600;
  color: #111827;
  margin: 0;
}
.dash-empty .dash-empty__text {
  font-size: 12.5px;
  color: #6b7280;
  margin: 0;
  max-width: 260px;
  line-height: 1.45;
}
.dash-empty .dash-empty__cta {
  margin-top: 10px;
  font-size: 12.5px;
  color: #3b82f6;
  font-weight: 500;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.08);
  transition: background 0.18s ease;
}
.dash-empty .dash-empty__cta:hover {
  background: rgba(59, 130, 246, 0.15);
}
.dash-empty.is-error {
  color: #ef4444;
}
.dash-empty.is-error .dash-empty__icon {
  background: linear-gradient(135deg, #fee2e2, #fecaca);
  color: #b91c1c;
}
.dash-empty.is-error .dash-empty__title {
  color: #ef4444;
}

.dash-loading {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 14px;
  color: #9ca3af;
  min-height: 160px;
}
.dash-loading i {
  font-size: 28px;
  animation: dashSpin 1s linear infinite;
  display: inline-block;
}

.dash-link {
  color: #3b82f6;
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.dash-link:hover {
  text-decoration: underline;
}

@keyframes dashSpin {
  to {
    transform: rotate(360deg);
  }
}
@keyframes dashSkeleton {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}
@media (max-width: 768px) {
  .dash-widget__header {
    padding: 14px 16px 10px;
  }
  .dash-widget__body {
    padding: 8px 16px 16px;
  }
  .dash-kpi-value {
    font-size: 24px;
  }
  .dash-kpi-card {
    padding: 14px;
    min-height: auto;
  }
}
.dash-widget__body--graph {
  padding: 14px 18px 18px !important;
}

.dash-graph {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.dash-graph__canvas {
  flex: 1 1 auto;
  min-height: 0;
  width: 100% !important;
  max-width: 100%;
}
.dash-graph__warning {
  margin: 0;
  font-size: 11.5px;
  color: #6b7280;
  background: rgba(245, 158, 11, 0.08);
  border-left: 3px solid #f59e0b;
  padding: 6px 10px;
  border-radius: 6px;
  line-height: 1.4;
}

.dash-picker-card--feature {
  border-color: rgba(59, 130, 246, 0.35);
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.04), rgba(139, 92, 246, 0.06));
}
.dash-picker-card--feature:hover {
  border-color: rgba(59, 130, 246, 0.6);
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.08), rgba(139, 92, 246, 0.12));
}
.dash-picker-card--feature .dash-picker-card__icon--accent {
  background: linear-gradient(135deg, #ddd6fe, #c4b5fd);
  color: #6d28d9;
}

.dash-picker__hint {
  margin: 14px 0 0;
  font-size: 12.5px;
  color: #6b7280;
  text-align: center;
  line-height: 1.5;
}

.dash-graph-builder-overlay .dash-picker {
  max-width: 1100px;
  max-height: 92vh;
}

.dash-graph-builder__body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 460px);
  gap: 24px;
  padding: 22px 24px 16px;
  overflow-y: auto;
}
@media (max-width: 900px) {
  .dash-graph-builder__body {
    grid-template-columns: 1fr;
  }
}
.dash-graph-builder__form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
}
.dash-graph-builder__preview {
  background: #f8fafc;
  border: 1px solid #eef0f3;
  border-radius: 14px;
  padding: 14px 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 360px;
  position: sticky;
  top: 0;
  align-self: start;
}
.dash-graph-builder__footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 24px 18px;
  border-top: 1px solid #eef0f3;
  background: #ffffff;
}

.dash-gb-step {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.dash-gb-step__title {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: #111827;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.dash-gb-step__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(59, 130, 246, 0.12);
  color: #3b82f6;
  font-size: 11.5px;
  font-weight: 700;
}

.dash-gb-datasets {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
}

.dash-gb-dataset {
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  padding: 12px;
  background: #ffffff;
  border: 1.5px solid #e5e7eb;
  border-radius: 12px;
  cursor: pointer;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}
.dash-gb-dataset:hover {
  border-color: rgba(59, 130, 246, 0.4);
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.06);
}
.dash-gb-dataset.is-active {
  border-color: #3b82f6;
  background: rgba(59, 130, 246, 0.04);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}
.dash-gb-dataset__icon {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, #eff6ff, #dbeafe);
  color: #1d4ed8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.dash-gb-dataset__icon i {
  font-size: 18px;
}
.dash-gb-dataset__body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.dash-gb-dataset__body strong {
  font-size: 13.5px;
  color: #111827;
  font-weight: 600;
}
.dash-gb-dataset__body small {
  font-size: 11.5px;
  color: #6b7280;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dash-gb-select,
.dash-gb-input {
  width: 100%;
  padding: 9px 12px;
  font-size: 13.5px;
  color: #111827;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.dash-gb-select:focus,
.dash-gb-input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.dash-gb-select {
  -webkit-appearance: none;
     -moz-appearance: none;
          appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path fill='%236b7280' d='M6 8L0 0h12z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}

.dash-gb-chart-types {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 8px;
}

.dash-gb-chart-type {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 12px 8px;
  background: #ffffff;
  border: 1.5px solid #e5e7eb;
  border-radius: 10px;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease;
  color: #6b7280;
  font-size: 11.5px;
  text-align: center;
}
.dash-gb-chart-type i {
  font-size: 22px;
  color: #6b7280;
  transition: color 0.18s ease;
}
.dash-gb-chart-type:hover {
  border-color: rgba(59, 130, 246, 0.4);
  color: #111827;
}
.dash-gb-chart-type:hover i {
  color: #111827;
}
.dash-gb-chart-type.is-active {
  border-color: #3b82f6;
  background: rgba(59, 130, 246, 0.06);
  color: #3b82f6;
  font-weight: 600;
}
.dash-gb-chart-type.is-active i {
  color: #3b82f6;
}

.dash-gb-preview__header {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.dash-gb-preview__header i {
  font-size: 14px;
}
.dash-gb-preview__canvas {
  position: relative;
  flex: 1 1 auto;
  min-height: 280px;
  background: #ffffff;
  border-radius: 10px;
  border: 1px solid #eef0f3;
  padding: 10px;
  overflow: hidden;
}
.dash-gb-preview__canvas canvas {
  width: 100% !important;
  height: 100% !important;
}
.dash-gb-preview__canvas.is-loading::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(1px);
}
.dash-gb-preview__placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 100%;
  color: #9ca3af;
  text-align: center;
  padding: 20px;
}
.dash-gb-preview__placeholder i {
  font-size: 36px;
}
.dash-gb-preview__placeholder p {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.4;
  max-width: 260px;
}
.dash-gb-preview__placeholder.is-error {
  color: #b91c1c;
}
.dash-gb-preview__placeholder.is-error i {
  color: #ef4444;
}
.dash-gb-preview__warning {
  margin: 0;
  font-size: 11.5px;
  color: #92400e;
  background: rgba(245, 158, 11, 0.12);
  border-left: 3px solid #f59e0b;
  padding: 6px 10px;
  border-radius: 6px;
}

.dash-is-readonly .dash-widget__drag,
.dash-is-readonly .dash-widget__menu-btn,
.dash-is-readonly .dash-widget__menu {
  display: none !important;
}
.dash-is-readonly .dash-widget {
  cursor: default;
}

.inline-edit-active .form-control,
.inline-edit-active .form-select {
  border-color: var(--primary-color, #2563eb);
  background-color: #fff;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1);
}
.inline-edit-active .form-control:focus,
.inline-edit-active .form-select:focus {
  border-color: var(--primary-color, #2563eb);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

.inline-edit-field {
  animation: fadeInField 0.2s ease-out;
}

@keyframes fadeInField {
  from {
    opacity: 0;
    transform: translateY(-2px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.btn-group .btn-success,
.btn-group .btn-outline-secondary {
  transition: all 0.2s ease;
}

.table-borderless td {
  vertical-align: middle;
}
.table-borderless td.inline-edit-active {
  padding-top: 0.25rem;
  padding-bottom: 0.25rem;
}

input[type=range].inline-edit-field {
  accent-color: var(--primary-color, #2563eb);
}

.score-value {
  font-weight: 600;
  min-width: 40px;
  text-align: right;
}

@media (max-width: 768px) {
  .inline-edit-field {
    width: 100% !important;
  }
}
/* ─────────────────────────────────────────────────────────────────
   Contact Wizard — alias retro-compatible vers .wizard-offcanvas
   Le design générique vit dans components/_wizard-offcanvas.scss
   ───────────────────────────────────────────────────────────────── */
/* Rétro-compat : permettre l'ancien markup .contact-offcanvas-* */
/* Anciens noms .company-mode-* (toujours utilisés dans contacts.php) */
/* Anciens noms .client-picker-* → .entity-picker-* */
/* =================================================================
   PAGE PROFILE - Styles pour la page de profil utilisateur
   Réutilise le système .entity-details-* mutualisé avec contact_details
   et client_details. Les styles ci-dessous ne définissent que les
   spécificités du profil (chip de rôle, point statut, ajustements
   du tableau d'historique et des KPI mensuels).
   ================================================================= */
/* =================================================================
   CHIP DE RÔLE – affiché dans le subtitle de la profile-card
   et dans la valeur de la ligne "Rôle" de l'attribute-list.
   ================================================================= */
.user-role-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--role-color, #6366f1);
  background: color-mix(in srgb, var(--role-color, #6366f1) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--role-color, #6366f1) 28%, transparent);
}
.user-role-chip i {
  font-size: 0.85rem;
}
.user-role-chip--inline {
  padding: 0.18rem 0.5rem;
}

/* =================================================================
   PUCE DE STATUT – Actif / Inactif
   ================================================================= */
.user-status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-left: 0.4rem;
  background: #d1d5db;
  box-shadow: 0 0 0 2px rgba(209, 213, 219, 0.25);
  vertical-align: middle;
}
.user-status-dot--on {
  background: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.18);
}
.user-status-dot--off {
  background: #9ca3af;
  box-shadow: 0 0 0 3px rgba(156, 163, 175, 0.15);
}

/* Le subtitle peut contenir le chip de rôle + la puce de statut côte à côte */
.entity-profile-card__subtitle {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
}

/* =================================================================
   STATS GRID dans la colonne centrale (pane d'activity)
   – on conserve les .stat-card existantes mais on retire le hover
     translateY (visuellement gênant à l'intérieur d'un pane).
   ================================================================= */
.entity-activity__pane #userStats .stat-card {
  border-radius: 12px;
  box-shadow: none;
  border-color: #eef0f4;
}
.entity-activity__pane #userStats .stat-card:hover {
  transform: none;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
}

/* =================================================================
   TABLEAU HISTORIQUE (mensuel / annuel)
   ================================================================= */
.profile-stats-table {
  margin: 0;
  font-size: 0.875rem;
}
.profile-stats-table thead th {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #6b7280;
  background: #f8f9fc;
  border: none;
  padding: 0.65rem 0.9rem;
  white-space: nowrap;
}
.profile-stats-table thead th:first-child {
  border-top-left-radius: 8px;
  border-bottom-left-radius: 8px;
}
.profile-stats-table thead th:last-child {
  border-top-right-radius: 8px;
  border-bottom-right-radius: 8px;
}
.profile-stats-table tbody td {
  padding: 0.85rem 0.9rem;
  border-bottom: 1px solid #eef0f4;
  vertical-align: middle;
  color: #111827;
}
.profile-stats-table tbody tr:last-child td {
  border-bottom: none;
}
.profile-stats-table tbody tr {
  transition: background-color 0.15s ease;
}
.profile-stats-table tbody tr:hover {
  background-color: rgba(238, 242, 255, 0.55);
}
.profile-stats-table .badge.badge-sm {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.28rem 0.6rem;
  border-radius: 999px;
  min-width: 2.25rem;
}

/* =================================================================
   APERÇU RAPIDE (col droite) – override visuel des KPIs
   ================================================================= */
#userKpisGrid .entity-kpi__value {
  font-size: 1rem;
  font-weight: 700;
  color: #111827;
}

/* =================================================================
   STATISTIQUES CARDS
   ================================================================= */
.stat-card {
  transition: all 0.2s ease;
  border: 1px solid var(--border-color);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}
.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  border-color: var(--primary-color);
}
.stat-card .card-body {
  padding: 1rem !important;
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.stat-icon i {
  font-size: 24px;
  color: white;
}
.stat-icon.bg-primary {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}
.stat-icon.bg-info {
  background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
}
.stat-icon.bg-warning {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}
.stat-icon.bg-success {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}
.stat-icon.bg-secondary {
  background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
}
.stat-icon.bg-danger {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.stat-content {
  min-width: 0;
}
.stat-content .stat-number {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
  margin-bottom: 0.25rem;
}
@media (max-width: 768px) {
  .stat-content .stat-number {
    font-size: 1.25rem;
  }
}
.stat-content .stat-label {
  font-size: 0.875rem;
  color: var(--text-secondary);
  font-weight: 500;
  line-height: 1.3;
}
@media (max-width: 768px) {
  .stat-content .stat-label {
    font-size: 0.8125rem;
  }
}

/* =================================================================
   RESPONSIVE ADJUSTMENTS
   ================================================================= */
@media (max-width: 1200px) {
  .stat-icon {
    width: 40px;
    height: 40px;
  }
  .stat-icon i {
    font-size: 20px;
  }
  .stat-content .stat-number {
    font-size: 1.25rem;
  }
  .stat-content .stat-label {
    font-size: 0.8125rem;
  }
}
@media (max-width: 768px) {
  .stat-card {
    margin-bottom: 1rem;
  }
  .stat-card:hover {
    transform: none;
  }
  .stat-card .card-body {
    padding: 0.75rem !important;
  }
  .stat-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
  }
  .stat-icon i {
    font-size: 18px;
  }
  .stat-content .stat-number {
    font-size: 1.125rem;
  }
  .stat-content .stat-label {
    font-size: 0.75rem;
  }
}
/* =================================================================
   ANIMATION AU CHARGEMENT
   ================================================================= */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.stat-card {
  animation: fadeInUp 0.4s ease-out;
}
.stat-card:nth-child(1) {
  animation-delay: 0.1s;
}
.stat-card:nth-child(2) {
  animation-delay: 0.2s;
}
.stat-card:nth-child(3) {
  animation-delay: 0.3s;
}
.stat-card:nth-child(4) {
  animation-delay: 0.4s;
}
.stat-card:nth-child(5) {
  animation-delay: 0.5s;
}
.stat-card:nth-child(6) {
  animation-delay: 0.6s;
}

/* =================================================================
   LOADING STATE
   ================================================================= */
.stat-card.loading .stat-icon {
  background: #e5e7eb !important;
}
.stat-card.loading .stat-icon i {
  display: none;
}
.stat-card.loading .stat-icon::after {
  content: "";
  width: 20px;
  height: 20px;
  border: 2px solid #f3f4f6;
  border-radius: 50%;
  border-top-color: #9ca3af;
  animation: spin 1s ease-in-out infinite;
}
.stat-card.loading .stat-number,
.stat-card.loading .stat-label {
  background: #e5e7eb;
  color: transparent;
  border-radius: 4px;
  position: relative;
  overflow: hidden;
}
.stat-card.loading .stat-number::after,
.stat-card.loading .stat-label::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  animation: shimmer 1.5s infinite;
}
.stat-card.loading .stat-number {
  height: 1.5rem;
  margin-bottom: 0.5rem;
}
.stat-card.loading .stat-label {
  height: 1rem;
  width: 80%;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
@keyframes shimmer {
  to {
    left: 100%;
  }
}
/* =================================================================
   ÉTAT VIDE
   ================================================================= */
.stats-empty {
  text-align: center;
  padding: 3rem 1rem;
}
.stats-empty .empty-icon {
  width: 64px;
  height: 64px;
  background: var(--hover-bg);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
}
.stats-empty .empty-icon i {
  font-size: 24px;
  color: var(--text-muted);
}
.stats-empty .empty-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}
.stats-empty .empty-message {
  color: var(--text-secondary);
  font-size: 0.875rem;
}

/* =================================================================
   PAGE SETTINGS - Design moderne avec onglets pill
   ================================================================= */
.settings-page {
  max-width: 900px;
}
.settings-page .settings-header {
  margin-bottom: 2rem;
}
.settings-page .settings-header h1 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}
.settings-page .settings-header p {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  margin: 0;
}

/* =================================================================
   TABS PILL NAVIGATION
   ================================================================= */
.settings-tabs {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
  padding: 0;
  list-style: none;
  border: none;
}
.settings-tabs .nav-item {
  width: auto !important;
  margin: 0;
  flex-wrap: nowrap;
}
.settings-tabs .nav-link {
  display: inline-flex !important;
  width: auto !important;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem 1.125rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  margin: 0;
  min-height: unset;
}
.settings-tabs .nav-link i {
  font-size: 1rem;
}
.settings-tabs .nav-link:hover {
  color: var(--text-primary);
  border-color: #d1d5db;
  background: var(--hover-bg);
}
.settings-tabs .nav-link.active {
  color: #fff !important;
  background: var(--text-primary) !important;
  border-color: var(--text-primary);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

/* =================================================================
   TAB CONTENT
   ================================================================= */
.settings-content {
  border: none;
  padding: 0;
  background: transparent;
}

/* =================================================================
   SECTIONS
   ================================================================= */
.settings-section {
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.75rem 2rem;
  margin-bottom: 1.5rem;
}
.settings-section:last-child {
  margin-bottom: 0;
}

.settings-section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.5rem;
}
.settings-section-header .section-title {
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}
.settings-section-header .section-desc {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  margin: 0;
}
.settings-section-header .section-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: var(--hover-bg);
}
.settings-section-header .section-icon i {
  font-size: 1.25rem;
  color: var(--text-secondary);
}

/* =================================================================
   FORM FIELDS SETTINGS
   ================================================================= */
.settings-section .form-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.375rem;
}
.settings-section .form-control,
.settings-section .form-select {
  border-radius: 8px;
  border: 1px solid var(--border-color);
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.settings-section .form-control:focus,
.settings-section .form-select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}
.settings-section .form-text {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}
.settings-section textarea.form-control {
  border-radius: 8px;
}

/* =================================================================
   INTEGRATION CARDS (Qonto, Airtable, etc.)
   ================================================================= */
.settings-integration-card {
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1rem;
  transition: border-color 0.2s ease;
}
.settings-integration-card:last-child {
  margin-bottom: 0;
}
.settings-integration-card:hover {
  border-color: #d1d5db;
}
.settings-integration-card.disabled-card {
  background: #fafafa;
  opacity: 0.7;
}
.settings-integration-card.disabled-card:hover {
  border-color: var(--border-color);
}

.integration-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0;
}
.integration-header.has-fields {
  margin-bottom: 1.25rem;
}
.integration-header .integration-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.integration-header .integration-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.375rem 0.875rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #fff;
  border-radius: 6px;
  white-space: nowrap;
}
.integration-header .integration-badge.badge-dark {
  background: var(--text-primary);
}
.integration-header .integration-badge.badge-muted {
  background: #9ca3af;
}
.integration-header .integration-desc {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  margin: 0;
}

/* =================================================================
   SWITCH TOGGLE OVERRIDE
   ================================================================= */
.settings-section .form-switch .form-check-input,
.settings-integration-card .form-switch .form-check-input {
  width: 2.75rem;
  height: 1.375rem;
  border-radius: 999px;
  cursor: pointer;
  border: 2px solid #d1d5db;
  background-color: #e5e7eb;
  transition: all 0.2s ease;
}
.settings-section .form-switch .form-check-input:checked,
.settings-integration-card .form-switch .form-check-input:checked {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}
.settings-section .form-switch .form-check-input:focus,
.settings-integration-card .form-switch .form-check-input:focus {
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}
.settings-section .form-switch .form-check-label,
.settings-integration-card .form-switch .form-check-label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-left: 0.25rem;
}

/* =================================================================
   BUTTONS SETTINGS
   ================================================================= */
.settings-section .btn-settings-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #fff;
  background: var(--text-primary);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.settings-section .btn-settings-primary:hover {
  background: #374151;
}
.settings-section .btn-settings-primary i {
  font-size: 1rem;
}
.settings-section .btn-settings-outline {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.4375rem 1rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-primary);
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.settings-section .btn-settings-outline:hover {
  background: var(--hover-bg);
  border-color: #d1d5db;
}
.settings-section .btn-settings-outline.danger {
  color: #dc2626;
  border-color: #fecaca;
}
.settings-section .btn-settings-outline.danger:hover {
  background: #fef2f2;
  border-color: #fca5a5;
}
.settings-section .btn-settings-outline.success {
  color: #059669;
  border-color: #a7f3d0;
}
.settings-section .btn-settings-outline.success:hover {
  background: #ecfdf5;
  border-color: #6ee7b7;
}
.settings-section .btn-settings-outline i {
  font-size: 0.875rem;
}

/* =================================================================
   API KEYS TABLE
   ================================================================= */
.settings-section .table {
  font-size: 0.8125rem;
}
.settings-section .table th {
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 2px solid var(--border-color);
  padding: 0.625rem 0.75rem;
}
.settings-section .table td {
  padding: 0.75rem;
  border-bottom: 1px solid #f3f4f6;
  vertical-align: middle;
}
.settings-section .table tbody tr:last-child td {
  border-bottom: none;
}

/* =================================================================
   USAGE BLOCK (API)
   ================================================================= */
.settings-usage-block {
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 1.25rem 1.5rem;
  margin-top: 1.5rem;
}
.settings-usage-block h6 {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}
.settings-usage-block pre {
  background: var(--text-primary);
  color: #e5e7eb;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  font-size: 0.8125rem;
  margin: 0;
  overflow-x: auto;
}

/* =================================================================
   RANGE SLIDER
   ================================================================= */
.settings-range {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.settings-range .form-range {
  flex: 1;
  height: 6px;
  padding: 0;
  background: transparent;
  -webkit-appearance: none;
  -moz-appearance: none;
       appearance: none;
}
.settings-range .form-range::-webkit-slider-runnable-track {
  height: 6px;
  background: #e5e7eb;
  border-radius: 999px;
}
.settings-range .form-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  background: var(--primary-color);
  border-radius: 50%;
  border: 3px solid #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
  margin-top: -7px;
  cursor: pointer;
}
.settings-range .range-value {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 52px;
  padding: 0.25rem 0.75rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--primary-color);
  background: #eff6ff;
  border-radius: 999px;
}

/* =================================================================
   PLACEHOLDER / COMING SOON
   ================================================================= */
.settings-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 1rem;
  text-align: center;
}
.settings-placeholder .placeholder-icon {
  width: 56px;
  height: 56px;
  background: var(--hover-bg);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}
.settings-placeholder .placeholder-icon i {
  font-size: 1.5rem;
  color: var(--text-muted);
}
.settings-placeholder .placeholder-title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}
.settings-placeholder .placeholder-desc {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

/* =================================================================
   LOGO PREVIEW
   ================================================================= */
.logo-upload-area {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.logo-upload-area .logo-preview-box {
  width: 64px;
  height: 64px;
  border: 2px dashed var(--border-color);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}
.logo-upload-area .logo-preview-box img {
  max-width: 100%;
  max-height: 100%;
  -o-object-fit: contain;
     object-fit: contain;
}
.logo-upload-area .logo-preview-box i {
  font-size: 1.5rem;
  color: var(--text-muted);
}

/* =================================================================
   NEW KEY ALERT
   ================================================================= */
.settings-section .new-key-alert {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  border-radius: 10px;
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
}

/* =================================================================
   RESPONSIVE
   ================================================================= */
@media (max-width: 768px) {
  .settings-page .settings-header h1 {
    font-size: 1.5rem;
  }
  .settings-tabs {
    gap: 0.375rem;
  }
  .settings-tabs .nav-link {
    padding: 0.4375rem 0.875rem;
    font-size: 0.8125rem;
  }
  .settings-section {
    padding: 1.25rem;
    border-radius: 10px;
  }
  .settings-section-header {
    flex-direction: column;
    gap: 0.75rem;
  }
  .settings-integration-card {
    padding: 1rem;
  }
  .integration-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }
}
.campaign-steps {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.campaign-step {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 1.5rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
.campaign-step.active {
  border-color: var(--primary-color);
  box-shadow: 0 10px 30px rgba(37, 99, 235, 0.12);
  transform: translateY(-2px);
}
.campaign-step.completed .step-icon {
  background: #22c55e;
  color: #ffffff;
}

.campaign-step-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  cursor: pointer;
}
.campaign-step-header .step-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 1rem;
  background: #f3f4f6;
  color: #6b7280;
  flex-shrink: 0;
  transition: background 0.2s ease, color 0.2s ease;
}
.campaign-step-header .step-title {
  font-weight: 600;
  font-size: 1.05rem;
  margin-left: 0.75rem;
}

.campaign-step-toggle {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--border-color, #e5e7eb);
  background: #ffffff;
  color: #6b7280;
  cursor: pointer;
  padding: 0;
  font-size: 1rem;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.campaign-step-toggle i {
  line-height: 1;
  transition: transform 0.2s ease;
}
.campaign-step-toggle:hover, .campaign-step-toggle:focus-visible {
  background: #eef2ff;
  border-color: #c7d2fe;
  color: var(--primary-color, #4f46e5);
  outline: none;
}
.campaign-step-toggle[aria-expanded=true] {
  background: var(--primary-color, #4f46e5);
  border-color: var(--primary-color, #4f46e5);
  color: #ffffff;
}

.campaign-step-summary {
  display: block;
  color: #6b7280;
  font-size: 0.92rem;
  margin-top: 0.25rem;
}

.campaign-step-body {
  margin-top: 1.25rem;
  border-top: 1px dashed var(--border-color);
  padding-top: 1.25rem;
}

#campaignAttachmentsList .list-group-item {
  border: none;
  border-bottom: 1px solid rgba(226, 232, 240, 0.7);
}

#campaignAttachmentsList .list-group-item:last-child {
  border-bottom: none;
}

.builder-status-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  font-size: 0.85rem;
  background: #e0f2fe;
  color: #0369a1;
}

.campaign-design-preview {
  width: 180px;
  height: 180px;
  background: linear-gradient(135deg, #f5f7fa 0%, #e9ecef 100%);
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #dee2e6;
  flex-shrink: 0;
}

.campaign-design-preview-img {
  width: 100%;
  height: 100%;
  -o-object-fit: cover;
     object-fit: cover;
  -o-object-position: top center;
     object-position: top center;
}

.campaign-list-wrapper .list-group-flush .list-group-item {
  padding: 14px 20px;
  border-color: #f3f4f6;
  font-size: 13.5px;
  transition: background 0.15s ease;
}
.campaign-list-wrapper .list-group-flush .list-group-item:hover {
  background: #f8fafc;
}
.campaign-list-wrapper .list-group-flush .list-group-item.active, .campaign-list-wrapper .list-group-flush .list-group-item:active {
  background: rgba(59, 130, 246, 0.04);
  border-left: 3px solid var(--primary-color);
}
.campaign-list-wrapper .list-group-flush .list-group-item .fw-semibold {
  font-size: 14px;
  color: #1f2937;
}

.campaign-editor-body::-webkit-scrollbar {
  width: 5px;
}
.campaign-editor-body::-webkit-scrollbar-track {
  background: #f3f4f6;
}
.campaign-editor-body::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 3px;
}
.campaign-editor-body::-webkit-scrollbar-thumb:hover {
  background: #9ca3af;
}

.campaign-row-link {
  display: block;
  text-decoration: none;
  color: inherit;
}
.campaign-row-link:hover .campaign-row-name {
  color: var(--primary-color, #6366f1);
}

.campaign-row-name {
  font-weight: 600;
  font-size: 14px;
  color: #1f2937;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 280px;
}

.campaign-row-subject {
  font-size: 12.5px;
  color: #6b7280;
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 280px;
}

.campaign-stat-cell {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  line-height: 1.1;
}

.campaign-stat-value {
  font-weight: 600;
  color: #1f2937;
  font-size: 13.5px;
}

.campaign-stat-rate {
  font-size: 11.5px;
  color: #6b7280;
  font-weight: 500;
}

.campaign-edit-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
}

.campaign-edit-header-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
  min-width: 0;
}

.campaign-edit-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  color: var(--primary-color, #6366f1);
  text-decoration: none;
  transition: background 0.15s ease;
  font-size: 18px;
}
.campaign-edit-back:hover {
  background: rgba(99, 102, 241, 0.08);
  color: var(--primary-color, #6366f1);
}

.campaign-edit-title-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}

.campaign-edit-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #111827;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 480px;
}

.campaign-edit-rename {
  border: none;
  background: transparent;
  color: var(--primary-color, #6366f1);
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: background 0.15s ease;
}
.campaign-edit-rename:hover {
  background: rgba(99, 102, 241, 0.08);
}

.campaign-edit-status {
  margin-left: 0.25rem;
}

.campaign-edit-header-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.campaign-edit-btn {
  border-radius: 999px;
  padding: 0.5rem 1.25rem;
  font-weight: 500;
  font-size: 0.875rem;
  white-space: nowrap;
}

.campaign-edit-subtitle {
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}

.campaign-edit-wrapper {
  max-width: 760px;
  margin: 0 auto;
}

.campaign-edit-card {
  background: #ffffff;
  border: 1px solid var(--border-color, #e5e7eb);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
.campaign-edit-card .campaign-editor-body {
  padding: 1.5rem;
  min-height: 320px;
}
.campaign-edit-card .campaign-steps {
  gap: 0;
}
.campaign-edit-card .campaign-step {
  border: none;
  border-radius: 0;
  border-bottom: 1px solid var(--border-color, #e5e7eb);
  box-shadow: none;
  transform: none;
  padding: 1.25rem 0;
}
.campaign-edit-card .campaign-step:first-child {
  padding-top: 0;
}
.campaign-edit-card .campaign-step:last-child {
  border-bottom: none;
  padding-bottom: 0;
}
.campaign-edit-card .campaign-step.active {
  border-bottom-color: var(--border-color, #e5e7eb);
  box-shadow: none;
  transform: none;
}

.campaign-edit-secondary-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color, #e5e7eb);
}

@media (max-width: 991px) {
  .campaign-step {
    padding: 1.25rem;
  }
  .campaign-step-header {
    flex-direction: column;
    align-items: flex-start;
  }
  .campaign-design-preview {
    width: 150px;
    height: 150px;
  }
  .campaign-edit-title {
    font-size: 1.25rem;
    max-width: 240px;
  }
}
/* ─── Dropzone "Pièces jointes" (style import-offcanvas) ───────── */
.campaign-attach-dropzone {
  position: relative;
  border: 2px dashed #cbd5e1;
  border-radius: 14px;
  padding: 36px 20px;
  text-align: center;
  background: #f8fafc;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}
.campaign-attach-dropzone:hover, .campaign-attach-dropzone:focus-visible, .campaign-attach-dropzone.is-dragover {
  border-color: var(--primary-color, #4f46e5);
  background: #eef2ff;
  outline: none;
}
.campaign-attach-dropzone.is-disabled {
  cursor: not-allowed;
  opacity: 0.6;
}
.campaign-attach-dropzone.is-disabled:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
}

.campaign-attach-dropzone-inner {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
}

.campaign-attach-dropzone-icon {
  font-size: 2.4rem;
  color: var(--primary-color, #4f46e5);
}

.campaign-attach-dropzone-title {
  font-weight: 600;
  color: #1f2937;
}

.campaign-attach-dropzone-sub {
  color: #6b7280;
  font-size: 0.85rem;
}

.campaign-attach-dropzone-hint {
  margin-top: 8px;
  color: #475569;
  font-size: 0.78rem;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #fff;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid #e5e7eb;
}

.campaign-attach-list {
  list-style: none;
  padding: 0;
  margin: 16px 0 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.campaign-attach-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.campaign-attach-item:hover {
  border-color: #c7d2fe;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.06);
}

.campaign-attach-item-icon {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: #eef2ff;
  color: var(--primary-color, #4f46e5);
  font-size: 1.1rem;
}

.campaign-attach-item-body {
  flex: 1 1 auto;
  min-width: 0;
}
.campaign-attach-item-body a {
  color: #1f2937;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}
.campaign-attach-item-body a:hover {
  color: var(--primary-color, #4f46e5);
}

.campaign-attach-item-meta {
  font-size: 0.75rem;
  color: #6b7280;
  margin-top: 2px;
}

.campaign-attach-empty {
  margin-top: 12px;
  padding: 14px;
  background: #f9fafb;
  border: 1px dashed #e5e7eb;
  border-radius: 12px;
  text-align: center;
  color: #6b7280;
  font-size: 0.85rem;
}

/* ─── Étape Design : picker de templates ───────────────────────── */
.campaign-design-picker {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.campaign-design-picker-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.campaign-design-picker-title {
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 0.15rem;
}

.campaign-design-picker-sub {
  font-size: 0.85rem;
  color: #6b7280;
}

.campaign-design-see-all {
  background: transparent;
  border: none;
  color: var(--primary-color, #4f46e5);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  padding: 0.25rem 0;
  display: inline-flex;
  align-items: center;
}
.campaign-design-see-all:hover {
  text-decoration: underline;
}

.campaign-design-mini-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
@media (max-width: 991px) {
  .campaign-design-mini-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.campaign-design-mini-card {
  position: relative;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 0;
  overflow: hidden;
  cursor: pointer;
  text-align: left;
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
.campaign-design-mini-card:hover, .campaign-design-mini-card:focus-visible {
  border-color: #c7d2fe;
  box-shadow: 0 8px 22px rgba(79, 70, 229, 0.1);
  transform: translateY(-1px);
  outline: none;
}
.campaign-design-mini-card.is-selected {
  border-color: var(--primary-color, #4f46e5);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}

.campaign-design-mini-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 4/3;
  background: #f8fafc;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.campaign-design-mini-thumb img {
  width: 100%;
  height: 100%;
  -o-object-fit: cover;
     object-fit: cover;
  -o-object-position: top center;
     object-position: top center;
}

.campaign-design-thumb-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: #cbd5e1;
  font-size: 2rem;
}

.campaign-design-mini-name {
  padding: 10px 12px;
  font-weight: 500;
  font-size: 0.85rem;
  color: #1f2937;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border-top: 1px solid #f1f5f9;
}

.campaign-design-mini-check {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--primary-color, #4f46e5);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  box-shadow: 0 4px 10px rgba(79, 70, 229, 0.3);
}

.campaign-design-mini-create {
  align-items: center;
  justify-content: center;
  padding: 18px 12px;
  background: #f8fafc;
  border: 2px dashed #cbd5e1;
  text-align: center;
  gap: 4px;
}
.campaign-design-mini-create:hover, .campaign-design-mini-create:focus-visible {
  border-color: var(--primary-color, #4f46e5);
  background: #eef2ff;
}

.campaign-design-mini-create-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #ffffff;
  color: var(--primary-color, #4f46e5);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  border: 1px solid #e0e7ff;
  margin-bottom: 6px;
}

.campaign-design-mini-create-label {
  font-weight: 600;
  color: #1f2937;
  font-size: 0.85rem;
}

.campaign-design-mini-create-sub {
  font-size: 0.75rem;
  color: #6b7280;
}

.campaign-design-picker-divider {
  position: relative;
  text-align: center;
  margin: 0.5rem 0;
}
.campaign-design-picker-divider::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: #e5e7eb;
}
.campaign-design-picker-divider span {
  position: relative;
  background: #ffffff;
  padding: 0 12px;
  color: #94a3b8;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.campaign-design-blank-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 12px 16px;
  cursor: pointer;
  text-align: left;
  color: #1f2937;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.campaign-design-blank-btn > i:first-child {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: #eef2ff;
  color: var(--primary-color, #4f46e5);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}
.campaign-design-blank-btn:hover, .campaign-design-blank-btn:focus-visible {
  border-color: #c7d2fe;
  background: #fafbff;
  outline: none;
}

.campaign-design-blank-text {
  flex: 1;
  min-width: 0;
}

.campaign-design-blank-title {
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 1px;
}

.campaign-design-blank-sub {
  color: #6b7280;
  font-size: 0.8rem;
}

/* ─── État vide (aucun template existant) ─── */
.campaign-design-empty {
  padding: 28px 20px;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 14px;
  text-align: center;
}

.campaign-design-empty-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #eef2ff;
  color: var(--primary-color, #4f46e5);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  margin-bottom: 12px;
}

.campaign-design-empty-title {
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 0.4rem;
}

.campaign-design-empty-sub {
  color: #6b7280;
  font-size: 0.85rem;
  margin-bottom: 1rem;
}

/* ─── Vue : template sélectionné ───────────────────────────────── */
.campaign-design-selected {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 1.25rem;
  padding: 1rem;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
}
@media (max-width: 768px) {
  .campaign-design-selected {
    grid-template-columns: 1fr;
  }
}

.campaign-design-selected-thumb {
  width: 100%;
  aspect-ratio: 4/3;
  border-radius: 10px;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid #e5e7eb;
}
.campaign-design-selected-thumb img {
  width: 100%;
  height: 100%;
  -o-object-fit: cover;
     object-fit: cover;
  -o-object-position: top center;
     object-position: top center;
}

.campaign-design-selected-body {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1rem;
}

.campaign-design-selected-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.campaign-design-selected-title {
  font-weight: 700;
  font-size: 1.05rem;
  color: #111827;
}

.campaign-design-selected-subject,
.campaign-design-selected-date {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: #6b7280;
}

.campaign-design-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  align-self: flex-start;
  margin-top: 4px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 500;
  background: #eef2ff;
  color: var(--primary-color, #4f46e5);
}
.campaign-design-chip.campaign-design-chip-custom {
  background: #ecfdf5;
  color: #059669;
}

.campaign-design-selected-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

/* ─── Offcanvas galerie : grille de templates ─────────────────── */
.campaign-template-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}

.campaign-template-grid-card {
  position: relative;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 0;
  overflow: hidden;
  cursor: pointer;
  text-align: left;
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
.campaign-template-grid-card:hover, .campaign-template-grid-card:focus-visible {
  border-color: #c7d2fe;
  box-shadow: 0 8px 22px rgba(79, 70, 229, 0.12);
  transform: translateY(-1px);
  outline: none;
}
.campaign-template-grid-card.is-selected {
  border-color: var(--primary-color, #4f46e5);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}
.campaign-template-grid-card.is-selected .campaign-template-grid-check {
  opacity: 1;
  transform: scale(1);
}

.campaign-template-grid-thumb {
  width: 100%;
  aspect-ratio: 4/3;
  background: #f8fafc;
  overflow: hidden;
}
.campaign-template-grid-thumb img {
  width: 100%;
  height: 100%;
  -o-object-fit: cover;
     object-fit: cover;
  -o-object-position: top center;
     object-position: top center;
}

.campaign-template-grid-body {
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  border-top: 1px solid #f1f5f9;
}

.campaign-template-grid-name {
  font-weight: 600;
  color: #111827;
  font-size: 0.9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.campaign-template-grid-subject,
.campaign-template-grid-date {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.78rem;
  color: #6b7280;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.campaign-template-grid-check {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--primary-color, #4f46e5);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  opacity: 0;
  transform: scale(0.7);
  transition: opacity 0.2s ease, transform 0.2s ease;
  box-shadow: 0 4px 10px rgba(79, 70, 229, 0.3);
}

.campaign-template-grid-empty {
  grid-column: 1/-1;
  text-align: center;
  padding: 32px 16px;
  color: #6b7280;
}
.campaign-template-grid-empty i {
  font-size: 2rem;
  margin-bottom: 8px;
  display: block;
}
.campaign-template-grid-empty p {
  margin: 0;
  font-size: 0.9rem;
}

.tpl-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  height: 100%;
  animation: tplCardIn 0.35s ease-out backwards;
}
.tpl-card:hover {
  transform: translateY(-3px);
  border-color: rgba(59, 130, 246, 0.35);
  box-shadow: 0 12px 28px -12px rgba(15, 23, 42, 0.18), 0 4px 10px -6px rgba(15, 23, 42, 0.08);
}
.tpl-card:hover .tpl-card__overlay {
  opacity: 1;
}
.tpl-card:hover .tpl-card__chip {
  background: rgba(255, 255, 255, 0.96);
}
.tpl-card:hover .tpl-card__title {
  color: #3b82f6;
}

.col-12:nth-child(1) .tpl-card {
  animation-delay: 0.04s;
}

.col-12:nth-child(2) .tpl-card {
  animation-delay: 0.08s;
}

.col-12:nth-child(3) .tpl-card {
  animation-delay: 0.12s;
}

.col-12:nth-child(4) .tpl-card {
  animation-delay: 0.16s;
}

.col-12:nth-child(5) .tpl-card {
  animation-delay: 0.2s;
}

.col-12:nth-child(6) .tpl-card {
  animation-delay: 0.24s;
}

.col-12:nth-child(7) .tpl-card {
  animation-delay: 0.28s;
}

.col-12:nth-child(8) .tpl-card {
  animation-delay: 0.32s;
}

.col-12:nth-child(9) .tpl-card {
  animation-delay: 0.36s;
}

.col-12:nth-child(10) .tpl-card {
  animation-delay: 0.4s;
}

.col-12:nth-child(11) .tpl-card {
  animation-delay: 0.44s;
}

.col-12:nth-child(12) .tpl-card {
  animation-delay: 0.48s;
}

.col-12:nth-child(13) .tpl-card {
  animation-delay: 0.52s;
}

.col-12:nth-child(14) .tpl-card {
  animation-delay: 0.56s;
}

.col-12:nth-child(15) .tpl-card {
  animation-delay: 0.6s;
}

.col-12:nth-child(16) .tpl-card {
  animation-delay: 0.64s;
}

.col-12:nth-child(17) .tpl-card {
  animation-delay: 0.68s;
}

.col-12:nth-child(18) .tpl-card {
  animation-delay: 0.72s;
}

.tpl-card__preview {
  position: relative;
  display: block;
  width: 100%;
  height: 220px;
  background: #f8fafc;
  overflow: hidden;
  text-decoration: none;
  border-bottom: 1px solid #eef0f3;
}
.tpl-card__preview::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 40px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.85) 100%);
  pointer-events: none;
  z-index: 1;
}

.tpl-card__chip {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid #eef0f3;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: lowercase;
  color: #111827;
  transition: background 0.2s ease;
}
.tpl-card__chip i {
  font-size: 13px;
  color: #3b82f6;
}

.tpl-card__overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.82) 0%, rgba(147, 51, 234, 0.78) 100%);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.tpl-card__overlay-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: #ffffff;
  color: #111827;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 6px 16px -4px rgba(15, 23, 42, 0.25);
  transform: translateY(6px);
  transition: transform 0.2s ease;
}
.tpl-card__overlay-cta i {
  font-size: 16px;
  color: #3b82f6;
}
.tpl-card:hover .tpl-card__overlay-cta {
  transform: translateY(0);
}

.template-preview-img {
  width: 100%;
  height: 100%;
  -o-object-fit: cover;
     object-fit: cover;
  -o-object-position: top center;
     object-position: top center;
  background: #fff;
  display: block;
}

.template-preview-iframe-container {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #fff;
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.template-preview-iframe {
  width: 800px;
  height: 1200px;
  border: none;
  transform: scale(0.45);
  transform-origin: top center;
  pointer-events: none;
  background: #fff;
}

.template-preview-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #f8fafc;
  color: #9ca3af;
}
.template-preview-placeholder i {
  font-size: 2.5rem;
  opacity: 0.5;
}
.template-preview-placeholder p {
  margin-top: 0.5rem;
  font-size: 0.8rem;
}

.template-preview-text {
  width: 100%;
  height: 100%;
  background: #fff;
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.template-preview-text .template-preview-text-header {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.9rem;
  padding-bottom: 0.9rem;
  border-bottom: 1px dashed #e5e7eb;
}
.template-preview-text .template-preview-text-header i {
  font-size: 1.4rem;
  color: #3b82f6;
  flex-shrink: 0;
  margin-top: 2px;
}
.template-preview-text .template-preview-text-header .template-preview-text-subject {
  font-weight: 600;
  font-size: 0.95rem;
  color: #111827;
  flex: 1;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.template-preview-text .template-preview-text-content {
  flex: 1;
  color: #6b7280;
  font-size: 0.82rem;
  line-height: 1.6;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 6;
  -webkit-box-orient: vertical;
}

.tpl-card__body {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding: 1rem 1.15rem 1.1rem;
  flex: 1;
}

.tpl-card__header {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.tpl-card__title {
  font-size: 1rem;
  font-weight: 600;
  color: #111827;
  margin: 0;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.2s ease;
}

.tpl-card__meta {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: #6b7280;
}
.tpl-card__meta i {
  font-size: 14px;
  color: #9ca3af;
}

.tpl-card__subject {
  background: #f8fafc;
  border: 1px solid #eef0f3;
  border-radius: 10px;
  padding: 0.65rem 0.8rem;
}

.tpl-card__subject-label {
  display: block;
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #9ca3af;
  margin-bottom: 3px;
}

.tpl-card__subject-text {
  margin: 0;
  font-size: 0.87rem;
  color: #111827;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}

.tpl-card__subject--empty {
  color: #9ca3af;
  font-style: italic;
}

.tpl-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding-top: 0.85rem;
  border-top: 1px solid #eef0f3;
  margin-top: auto;
}

.tpl-card__date {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  color: #6b7280;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tpl-card__date i {
  font-size: 14px;
  color: #9ca3af;
  flex-shrink: 0;
}

.tpl-card__actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.tpl-card__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 32px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.tpl-card__btn i {
  font-size: 15px;
}
.tpl-card__btn:active {
  transform: scale(0.96);
}
.tpl-card__btn:focus-visible {
  outline: 2px solid rgba(59, 130, 246, 0.35);
  outline-offset: 2px;
}
.tpl-card__btn--primary {
  background: #3b82f6;
  color: #ffffff;
}
.tpl-card__btn--primary:hover {
  background: rgb(29.7434146341, 111.3414634146, 244.6565853659);
  color: #ffffff;
}
.tpl-card__btn--ghost {
  width: 32px;
  padding: 0;
  background: transparent;
  color: #6b7280;
  border-color: #e5e7eb;
}
.tpl-card__btn--ghost:hover {
  background: #f8fafc;
  color: #111827;
  border-color: #e5e7eb;
}
.tpl-card__btn--danger:hover {
  background: #fef2f2;
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.25);
}

#templatesEmpty.card.border-dashed {
  border: 2px dashed #e5e7eb;
  background: #f8fafc;
  border-radius: 16px;
  box-shadow: none;
}
#templatesEmpty.card.border-dashed .size-3 {
  font-size: 3rem;
  color: #9ca3af;
}
#templatesEmpty.card.border-dashed h5 {
  color: #111827;
  font-weight: 600;
}

@keyframes tplCardIn {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@media (min-width: 1400px) {
  .tpl-card__preview {
    height: 200px;
  }
  .template-preview-iframe {
    transform: scale(0.38);
  }
}
@media (max-width: 992px) {
  .tpl-card__preview {
    height: 200px;
  }
  .template-preview-iframe {
    transform: scale(0.4);
  }
}
@media (max-width: 576px) {
  .tpl-card__preview {
    height: 180px;
  }
  .template-preview-iframe {
    width: 600px;
    height: 900px;
    transform: scale(0.35);
  }
  .tpl-card__btn--primary span {
    display: none;
  }
  .tpl-card__date {
    font-size: 11px;
  }
}
/* ────────────────────────────────────────────────────────────────
   Email builder — refonte UI (page email_builder.php uniquement)
   Scope via .email-builder-page pour ne pas impacter les autres écrans
   ──────────────────────────────────────────────────────────────── */
.email-builder-page {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}
.email-builder-page .main-content-area {
  padding: 0;
  background: #ffffff;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}
.email-builder-page .builder-topbar {
  flex: 0 0 auto;
}
.email-builder-page .builder-layout {
  border-radius: 0;
  border: none;
  box-shadow: none;
  background: #ffffff;
  gap: 0;
  flex: 1 1 auto;
  min-height: 0;
  align-items: stretch;
  overflow: hidden;
  flex-wrap: nowrap;
}
.email-builder-page .builder-layout .builder-panel {
  border-radius: 0;
  background: #ffffff;
  flex: 0 0 auto;
  align-self: stretch;
  max-height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.email-builder-page .builder-layout .builder-canvas-wrapper {
  border-radius: 0;
  max-height: 100%;
  min-height: 0;
  align-self: stretch;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.email-builder-page .builder-palette {
  padding: 1.25rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  border-right: 1px solid rgba(148, 163, 184, 0.25);
  background: #ffffff;
}
.email-builder-page .builder-palette > * {
  flex-shrink: 0;
}
.email-builder-page .builder-palette .builder-palette-section h6 {
  margin-bottom: 0.6rem;
  letter-spacing: 0.12em;
  font-size: 0.7rem;
  font-weight: 700;
  color: #64748b;
}
.email-builder-page .builder-inspector {
  border-left: 1px solid rgba(148, 163, 184, 0.25);
  background: #ffffff;
}

/* ─── Barre d'outils (remplace l'ancienne .card-header) ─────────── */
.builder-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1.25rem;
  background: #ffffff;
  border-bottom: 1px solid rgba(148, 163, 184, 0.25);
  min-height: 64px;
}
.builder-topbar__left, .builder-topbar__center, .builder-topbar__right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.builder-topbar__left {
  flex: 1;
  min-width: 0;
}
.builder-topbar__right {
  flex: 1;
  justify-content: flex-end;
}
.builder-topbar__center {
  flex: 0 0 auto;
}
.builder-topbar__back {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.75rem;
  border-radius: 8px;
  color: #475569;
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  border: 1px solid transparent;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.builder-topbar__back i {
  font-size: 1.05rem;
}
.builder-topbar__back:hover {
  background: #f1f5f9;
  color: #1f2937;
  border-color: rgba(148, 163, 184, 0.3);
}

/* ─── Fil d'Ariane ──────────────────────────────────────────────── */
.builder-breadcrumb {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9rem;
  min-width: 0;
}
.builder-breadcrumb__root {
  color: #94a3b8;
  font-weight: 500;
}
.builder-breadcrumb__sep {
  color: #cbd5e1;
}
.builder-breadcrumb__current {
  color: #0f172a;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 320px;
  background: transparent;
  border: none;
  padding: 0.2rem 0.4rem;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.builder-breadcrumb__current:hover, .builder-breadcrumb__current:focus-visible {
  background: #f1f5f9;
  color: #4f46e5;
  outline: none;
}
.builder-breadcrumb__edit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  color: #94a3b8;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.builder-breadcrumb__edit i {
  font-size: 1rem;
}
.builder-breadcrumb__edit:hover, .builder-breadcrumb__edit:focus-visible {
  background: #eef2ff;
  color: #4f46e5;
  border-color: rgba(99, 102, 241, 0.25);
  outline: none;
}

/* ─── Toggle Desktop / Mobile (style pill, image 2) ─────────────── */
.builder-viewport-toggle {
  display: inline-flex;
  align-items: center;
  background: #f1f5f9;
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 999px;
  padding: 3px;
  gap: 2px;
}
.builder-viewport-toggle .btn {
  border: none;
  background: transparent;
  color: #64748b;
  padding: 6px 16px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}
.builder-viewport-toggle .btn i {
  font-size: 1rem;
}
.builder-viewport-toggle .btn:hover {
  color: #1f2937;
}
.builder-viewport-toggle .btn-check:checked + .btn {
  background: #ffffff;
  color: #e11d48;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08), 0 0 0 1px rgba(225, 29, 72, 0.25);
}

/* ─── Toggle de style intégré à la palette (variation pleine largeur) ─── */
.builder-style-toggle--full {
  display: flex;
  width: 100%;
}
.builder-style-toggle--full .btn {
  flex: 1;
  justify-content: center;
}

/* ─── Sélecteur visuel de templates (offcanvas mode campagne) ───── */
.template-picker {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.template-picker__search {
  position: relative;
}
.template-picker__search i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 1rem;
  pointer-events: none;
}
.template-picker__search .form-control {
  padding-left: 36px;
}
.template-picker__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  max-height: 460px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 2px;
}
.template-picker__empty {
  grid-column: 1/-1;
  padding: 2rem 1rem;
  text-align: center;
  color: #94a3b8;
  font-size: 0.9rem;
  background: #f8fafc;
  border: 1px dashed rgba(148, 163, 184, 0.35);
  border-radius: 12px;
}
.template-picker__card {
  position: relative;
  display: flex;
  flex-direction: column;
  text-align: left;
  background: #ffffff;
  border: 1.5px solid rgba(148, 163, 184, 0.25);
  border-radius: 12px;
  padding: 0;
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.template-picker__card:hover, .template-picker__card:focus-visible {
  border-color: #6366f1;
  box-shadow: 0 6px 16px rgba(99, 102, 241, 0.12);
  transform: translateY(-1px);
  outline: none;
}
.template-picker__card.is-selected {
  border-color: #4f46e5;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.18);
}
.template-picker__card.is-selected .template-picker__check {
  opacity: 1;
  transform: scale(1);
}
.template-picker__thumb {
  position: relative;
  display: block;
  aspect-ratio: 4/3;
  background: #f1f5f9;
  overflow: hidden;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}
.template-picker__thumb img {
  width: 100%;
  height: 100%;
  -o-object-fit: cover;
     object-fit: cover;
  -o-object-position: top center;
     object-position: top center;
  display: block;
}
.template-picker__thumb-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: #cbd5e1;
  background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
}
.template-picker__thumb-empty i {
  font-size: 2rem;
}
.template-picker__check {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #4f46e5;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.18);
  opacity: 0;
  transform: scale(0.8);
  transition: opacity 0.15s ease, transform 0.15s ease;
}
.template-picker__body {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.7rem 0.85rem 0.85rem;
}
.template-picker__name {
  font-size: 0.9rem;
  font-weight: 600;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.template-picker__meta {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.template-picker__meta i {
  font-size: 0.9rem;
  color: #94a3b8;
  flex-shrink: 0;
}

@media (max-width: 767px) {
  .template-picker__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 479px) {
  .template-picker__grid {
    grid-template-columns: 1fr;
  }
}
/* ─── Affichage read-only (date) dans l'offcanvas Information ──── */
.builder-info-readonly {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.85rem;
  background: #f8fafc;
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 8px;
  color: #475569;
  font-size: 0.9rem;
}
.builder-info-readonly i {
  color: #94a3b8;
  font-size: 1rem;
}

/* ─── Aperçu Mobile : largeur contrainte du canvas ──────────────── */
.builder-canvas-wrapper--mobile {
  display: flex;
  justify-content: center;
  align-items: flex-start;
}
.builder-canvas-wrapper--mobile .builder-canvas {
  max-width: 390px;
  width: 100%;
  margin: 0 auto;
  transition: max-width 0.25s ease;
}
.builder-canvas-wrapper--mobile .builder-section-body {
  flex-direction: column;
  gap: 0.5rem !important;
}
.builder-canvas-wrapper--mobile .builder-section-body.two-column .builder-column, .builder-canvas-wrapper--mobile .builder-section-body.one-column .builder-column {
  width: 100% !important;
}

/* ─── Responsive ────────────────────────────────────────────────── */
@media (max-width: 991px) {
  .email-builder-page {
    height: auto;
    min-height: 100vh;
    overflow: visible;
  }
  .email-builder-page .main-content-area,
  .email-builder-page .builder-layout {
    overflow: visible;
  }
  .email-builder-page .builder-layout .builder-panel,
  .email-builder-page .builder-layout .builder-canvas-wrapper {
    max-height: none;
    overflow-y: visible;
  }
}
@media (max-width: 768px) {
  .builder-topbar {
    flex-wrap: wrap;
    padding: 0.75rem 1rem;
  }
  .builder-topbar__center {
    order: 3;
    flex: 1 0 100%;
    justify-content: center;
  }
  .builder-breadcrumb__current {
    max-width: 160px;
  }
}
.page-header h1 {
  font-weight: 600;
  color: var(--bs-dark);
}
.page-header h1 i {
  opacity: 0.7;
}
.page-header p {
  font-size: 0.95rem;
}

.avatar-metric {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.avatar-sm {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 0.875rem;
}

.card {
  transition: all 0.2s ease;
}
.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1) !important;
}
.card.border-0 {
  border: 1px solid rgba(0, 0, 0, 0.05) !important;
}

.badge {
  font-weight: 500;
  padding: 0.35em 0.65em;
  font-size: 0.8125rem;
}
.badge.bg-success-subtle {
  background-color: rgba(25, 135, 84, 0.1) !important;
  color: #198754 !important;
}
.badge.bg-info-subtle {
  background-color: rgba(13, 202, 240, 0.1) !important;
  color: #0dcaf0 !important;
}
.badge.bg-danger-subtle {
  background-color: rgba(220, 53, 69, 0.1) !important;
  color: #dc3545 !important;
}
.badge.bg-warning-subtle {
  background-color: rgba(255, 193, 7, 0.1) !important;
  color: #ffc107 !important;
}

.nav-tabs {
  border-bottom: 2px solid #dee2e6;
}
.nav-tabs .nav-link {
  border: none;
  border-bottom: 3px solid transparent;
  color: #6c757d;
  font-weight: 500;
  padding: 1rem 1.5rem;
  transition: all 0.2s ease;
}
.nav-tabs .nav-link:hover {
  border-color: transparent;
  color: var(--bs-primary);
  background-color: rgba(var(--bs-primary-rgb), 0.05);
}
.nav-tabs .nav-link.active {
  color: var(--bs-primary);
  border-bottom-color: var(--bs-primary);
  background-color: transparent;
}
.nav-tabs .nav-link i {
  font-size: 1.1rem;
  position: relative;
  top: 1px;
}
.nav-tabs .nav-link .badge {
  font-size: 0.75rem;
  padding: 0.25em 0.5em;
}

.table th {
  font-weight: 600;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #6c757d;
  border-bottom: 2px solid #dee2e6;
}
.table td {
  vertical-align: middle;
  padding: 1rem 0.75rem;
  border-bottom: 1px solid #f0f0f0;
}
.table tbody tr {
  transition: all 0.15s ease;
}
.table tbody tr:hover {
  background-color: rgba(var(--bs-primary-rgb), 0.03);
  box-shadow: inset 3px 0 0 var(--bs-primary);
}

.text-muted i.fs-1 {
  font-size: 3rem !important;
  opacity: 0.3;
}
.text-muted p {
  font-size: 0.95rem;
}
.text-muted small {
  font-size: 0.85rem;
}

.btn-sm {
  padding: 0.375rem 0.75rem;
  font-size: 0.875rem;
}
.btn-sm i {
  font-size: 1rem;
  position: relative;
  top: 1px;
}

.spinner-border {
  width: 2rem;
  height: 2rem;
}

@media (max-width: 768px) {
  .avatar-metric {
    width: 48px;
    height: 48px;
  }
  .avatar-metric i {
    font-size: 1.25rem !important;
  }
  .card-body h3 {
    font-size: 1.5rem;
  }
  .nav-tabs .nav-link {
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
  }
  .nav-tabs .nav-link .badge {
    font-size: 0.7rem;
  }
  .table {
    font-size: 0.875rem;
  }
  .table th, .table td {
    padding: 0.75rem 0.5rem;
  }
}
.text-truncate {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn-outline-secondary:hover {
  transform: translateX(-2px);
}

.accordion .accordion-item {
  background-color: transparent;
}
.accordion .accordion-item .accordion-button {
  background-color: #fff;
  box-shadow: none;
  border: none;
  font-size: 0.95rem;
}
.accordion .accordion-item .accordion-button:not(.collapsed) {
  background-color: #f8f9fa;
  color: var(--bs-dark);
  box-shadow: none;
}
.accordion .accordion-item .accordion-button:focus {
  box-shadow: none;
  border: none;
}
.accordion .accordion-item .accordion-button::after {
  flex-shrink: 0;
  margin-left: 1rem;
}
.accordion .accordion-item .accordion-body {
  border-top: 1px solid #dee2e6;
}

.timeline {
  position: relative;
}
.timeline .timeline-item {
  position: relative;
}
.timeline .timeline-item:last-child {
  border-bottom: none !important;
  padding-bottom: 0 !important;
  margin-bottom: 0 !important;
}
.timeline .timeline-marker {
  font-size: 0.875rem;
}

.timeline a {
  word-break: break-all;
}
.timeline a:hover {
  text-decoration: underline;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.card,
.page-header {
  animation: fadeIn 0.3s ease-out;
}

@media (max-width: 768px) {
  .accordion-button {
    padding: 0.75rem !important;
    font-size: 0.875rem !important;
  }
  .accordion-button .d-flex.gap-3 {
    flex-direction: column !important;
    gap: 0.25rem !important;
  }
  .accordion-button .d-flex.gap-2 {
    flex-direction: column !important;
    gap: 0.5rem !important;
    align-items: flex-start !important;
  }
  .timeline-item {
    font-size: 0.875rem;
  }
  .timeline-item .timeline-marker {
    width: 28px !important;
    height: 28px !important;
  }
}
/* Documentation Workspace */
.documentation-area {
  background: #f8fafc;
  min-height: calc(100vh - 120px);
}

.documentation-hero {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  padding: 2.5rem;
  border-radius: 28px;
  background: linear-gradient(135deg, #2563eb 0%, #9333ea 100%);
  margin-bottom: 2rem;
  overflow: hidden;
  position: relative;
}

.documentation-hero__content {
  max-width: 60%;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  z-index: 2;
}

.documentation-hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
}

.documentation-hero__title {
  font-size: 2rem;
  font-weight: 700;
  margin: 0;
}

.documentation-hero__subtitle {
  margin: 0;
  opacity: 0.85;
  line-height: 1.6;
}

.documentation-hero__visual {
  position: relative;
  min-width: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.documentation-hero__glow {
  position: absolute;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle at center, rgba(255, 255, 255, 0.55) 0%, rgba(255, 255, 255, 0) 70%);
  filter: blur(6px);
}

.documentation-hero__preview {
  position: relative;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 220px;
  backdrop-filter: blur(6px);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.15);
}

.documentation-hero__preview-line {
  display: block;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.4);
}

.documentation-hero__preview-line.short {
  width: 70%;
}

.documentation-area__info {
  border-radius: 18px;
}

.documentation-app {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr) 260px;
  gap: 1.8rem;
  align-items: flex-start;
}

.documentation-app.is-loading {
  opacity: 0.55;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.documentation-menu {
  background: #ffffff;
  border-radius: 22px;
  padding: 1.75rem 1.5rem;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.05);
  display: flex;
  flex-direction: column;
  min-height: 520px;
}

.documentation-menu__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.documentation-menu__title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.2rem;
  color: var(--text-primary);
}

.documentation-menu__subtitle {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.documentation-menu__action {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: none;
  background: rgba(37, 99, 235, 0.12);
  color: #2563eb;
  font-size: 1.05rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, background 0.2s ease;
}

.documentation-menu__action:hover {
  transform: translateY(-1px);
  background: rgba(37, 99, 235, 0.18);
}

.documentation-menu__list {
  flex: 1;
  overflow-y: auto;
  padding-right: 0.35rem;
  scrollbar-width: thin;
}

.documentation-menu__list::-webkit-scrollbar {
  width: 6px;
}

.documentation-menu__list::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.35);
  border-radius: 999px;
}

.documentation-menu__empty {
  text-align: center;
  padding: 2rem 0.5rem;
  color: var(--text-secondary);
}

.documentation-menu__empty-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  border-radius: 18px;
  background: rgba(37, 99, 235, 0.08);
  color: #2563eb;
}

.documentation-menu__category {
  padding: 1rem 0.6rem 0.4rem;
  border-radius: 16px;
  transition: background 0.2s ease;
}

.documentation-menu__category:hover {
  background: rgba(148, 163, 184, 0.08);
}

.documentation-menu__category-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.6rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
}

.documentation-menu__category-name {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.documentation-menu__category-label {
  font-weight: 600;
}

.documentation-menu__category-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.documentation-menu__category-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--gradient-blue);
  display: inline-flex;
}

.documentation-menu__category-count {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.documentation-menu__drag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  margin-right: 0.4rem;
  color: var(--text-secondary);
  cursor: grab;
  transition: color 0.2s ease, transform 0.2s ease;
}

.documentation-menu__drag i {
  pointer-events: none;
  font-size: 1rem;
}

.documentation-menu__drag:active {
  cursor: grabbing;
}

.documentation-menu__drag--category {
  margin-right: 0.5rem;
}

.documentation-menu__drag--page {
  margin-right: 0.6rem;
}

.documentation-menu__category:hover .documentation-menu__drag,
.documentation-menu__page-row:hover .documentation-menu__drag {
  color: #1d4ed8;
}

.documentation-menu__pages {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.documentation-menu__page-row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.documentation-menu__page-row .documentation-menu__page {
  flex: 1;
}

.documentation-menu__page {
  border: none;
  background: transparent;
  border-radius: 12px;
  padding: 0.65rem 0.75rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-align: left;
  font-size: 0.93rem;
  color: var(--text-primary);
  transition: background 0.18s ease, transform 0.18s ease;
}

.documentation-menu__page:hover {
  background: rgba(37, 99, 235, 0.08);
  transform: translateX(3px);
}

.documentation-menu__page.is-active {
  background: rgba(37, 99, 235, 0.12);
  color: #1d4ed8;
  font-weight: 600;
}

.documentation-menu__page-indicator {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: transparent;
  transition: background 0.2s ease;
}

.documentation-menu__page.is-active .documentation-menu__page-indicator {
  background: #2563eb;
}

.documentation-menu__action-btn {
  border: none;
  background: transparent;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  opacity: 0;
  transition: opacity 0.2s ease, background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.documentation-menu__action-btn i {
  font-size: 0.9rem;
}

.documentation-menu__action-btn--compact {
  width: 26px;
  height: 26px;
}

.documentation-menu__action-btn--edit {
  color: rgba(37, 99, 235, 0.75);
}

.documentation-menu__action-btn--edit:hover {
  background: rgba(37, 99, 235, 0.12);
  color: #1d4ed8;
}

.documentation-menu__action-btn--danger {
  color: rgba(239, 68, 68, 0.8);
}

.documentation-menu__action-btn--danger:hover {
  background: rgba(239, 68, 68, 0.12);
  color: #b91c1c;
}

.documentation-menu__category:hover .documentation-menu__action-btn,
.documentation-menu__page-row:hover .documentation-menu__action-btn {
  opacity: 1;
}

.documentation-menu__action-btn:focus-visible {
  opacity: 1;
  outline: 2px solid rgba(37, 99, 235, 0.35);
  outline-offset: 2px;
  transform: translateY(-1px);
}

.documentation-menu__rename-input {
  width: 100%;
  flex: 1;
  border: none;
  background: rgba(37, 99, 235, 0.1);
  border-radius: 10px;
  padding: 0.35rem 0.55rem;
  font-size: 0.9rem;
  color: var(--text-primary);
  outline: none;
  transition: background 0.2s ease, box-shadow 0.2s ease;
  margin-right: 0.4rem;
}

.documentation-menu__rename-input:focus {
  background: rgba(37, 99, 235, 0.15);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}

.documentation-menu__rename-input::-moz-placeholder {
  color: var(--text-secondary);
  opacity: 0.6;
}

.documentation-menu__rename-input::placeholder {
  color: var(--text-secondary);
  opacity: 0.6;
}

.documentation-menu__add-page {
  margin: 0.8rem 0 0;
  width: 100%;
  border: none;
  background: transparent;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  color: var(--text-secondary);
  cursor: pointer;
}

.documentation-menu__category:hover .documentation-menu__add-page {
  opacity: 1;
  transform: translateY(0);
}

.documentation-menu__add-page-line {
  flex: 1;
  height: 1px;
  background: rgba(148, 163, 184, 0.4);
}

.documentation-menu__add-page-plus {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.12);
  color: #2563eb;
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.18);
}

.documentation-menu__add-page.is-editing {
  opacity: 1;
  transform: translateY(0);
  gap: 0;
}

.documentation-menu__new-input {
  width: 100%;
  border: none;
  background: transparent;
  border-bottom: 1px solid rgba(148, 163, 184, 0.4);
  padding: 0.4rem 0;
  font-size: 0.93rem;
  outline: none;
  color: var(--text-primary);
}

.documentation-menu__new-input::-moz-placeholder {
  color: var(--text-secondary);
  opacity: 0.6;
}

.documentation-menu__new-input::placeholder {
  color: var(--text-secondary);
  opacity: 0.6;
}

.documentation-menu__footer {
  margin-top: 1.5rem;
  border-top: 1px dashed rgba(148, 163, 184, 0.35);
  padding-top: 1.1rem;
}

.documentation-menu__quick-add {
  width: 100%;
  border: none;
  background: rgba(37, 99, 235, 0.1);
  color: #1d4ed8;
  font-weight: 500;
  border-radius: 12px;
  padding: 0.7rem 0.9rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: background 0.2s ease, transform 0.2s ease;
}

.documentation-menu__quick-add:hover {
  background: rgba(37, 99, 235, 0.16);
  transform: translateY(-1px);
}

.documentation-editor {
  background: transparent;
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
}

.documentation-editor__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.documentation-editor__breadcrumb {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.documentation-editor__breadcrumb i {
  font-size: 0.85rem;
  color: rgba(148, 163, 184, 0.8);
}

.documentation-editor__breadcrumb-item {
  color: inherit;
  font-weight: 500;
}

.documentation-editor__breadcrumb-item.is-muted {
  color: rgba(148, 163, 184, 0.9);
}

.documentation-editor__breadcrumb-item.is-current {
  color: var(--text-primary);
  font-weight: 600;
}

.documentation-editor__meta {
  display: flex;
  align-items: center;
}

.documentation-editor__status {
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
}

.documentation-editor__canvas {
  background: #ffffff;
  border-radius: 22px;
  padding: 2.2rem 2.4rem;
  box-shadow: 0 20px 30px rgba(15, 23, 42, 0.06);
  min-height: 520px;
  position: relative;
}

.documentation-editor__placeholder {
  text-align: center;
  color: var(--text-secondary);
  max-width: 420px;
  margin: 4rem auto;
}

.documentation-editor__placeholder-icon {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  margin: 0 auto 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  background: rgba(37, 99, 235, 0.1);
  color: #2563eb;
}

.placeholder-plus {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(37, 99, 235, 0.12);
  color: #1d4ed8;
  font-weight: 600;
  width: 24px;
  height: 24px;
  border-radius: 999px;
}

.documentation-editor__quill {
  display: none;
}

.documentation-editor__quill.is-active {
  display: block;
}

.documentation-editor__quill .ql-editor {
  min-height: 480px;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-primary);
  padding: 0;
}

.documentation-editor__quill .ql-editor h1,
.documentation-editor__quill .ql-editor h2,
.documentation-editor__quill .ql-editor h3 {
  margin-top: 2.2rem;
  margin-bottom: 1rem;
  font-weight: 700;
  color: #111827;
}

.documentation-editor__quill .ql-editor h1 {
  font-size: 2rem;
}

.documentation-editor__quill .ql-editor h2 {
  font-size: 1.5rem;
}

.documentation-editor__quill .ql-editor h3 {
  font-size: 1.25rem;
}

.documentation-editor__quill .ql-editor p {
  margin-bottom: 1rem;
}

.documentation-editor__quill .ql-editor img {
  max-width: 100%;
  border-radius: 16px;
  box-shadow: 0 18px 32px rgba(15, 23, 42, 0.12);
  margin: 1.8rem 0;
}

.documentation-toc {
  background: #ffffff;
  border-radius: 22px;
  padding: 1.6rem 1.4rem;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.05);
  position: sticky;
  top: 110px;
  max-height: calc(100vh - 140px);
  overflow-y: auto;
}

.documentation-toc__header h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.documentation-toc__header p {
  font-size: 0.78rem;
  margin: 0.4rem 0 1.2rem;
  color: var(--text-secondary);
}

.documentation-toc__list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.documentation-toc__empty {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  align-items: flex-start;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.documentation-toc__empty i {
  font-size: 1.4rem;
  color: #2563eb;
}

.documentation-toc__item {
  border: none;
  background: transparent;
  text-align: left;
  padding: 0.5rem 0.6rem;
  border-radius: 12px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  transition: background 0.18s ease, color 0.18s ease;
}

.documentation-toc__item:hover {
  background: rgba(37, 99, 235, 0.08);
  color: #1d4ed8;
}

.documentation-toc__item.is-active {
  background: rgba(37, 99, 235, 0.12);
  color: #1d4ed8;
  font-weight: 600;
}

.documentation-toc__item.level-2 {
  padding-left: 1.4rem;
}

.documentation-toc__item.level-3 {
  padding-left: 2rem;
  font-size: 0.82rem;
}

.documentation-menu__list .is-hidden {
  display: none;
}

.documentation-editor__placeholder.is-hidden,
.documentation-toc__empty.is-hidden {
  display: none;
}

/* Soft badge helpers */
.badge.bg-soft-primary {
  background: rgba(37, 99, 235, 0.12);
  color: #1d4ed8;
}

.badge.bg-soft-secondary {
  background: rgba(148, 163, 184, 0.25);
  color: #334155;
}

.badge.bg-soft-success {
  background: rgba(34, 197, 94, 0.15);
  color: #15803d;
}

.badge.bg-soft-warning {
  background: rgba(245, 158, 11, 0.15);
  color: #b45309;
}

.badge.bg-soft-danger {
  background: rgba(239, 68, 68, 0.15);
  color: #b91c1c;
}

@media (max-width: 1200px) {
  .documentation-app {
    grid-template-columns: 260px minmax(0, 1fr);
    grid-template-areas: "menu editor" "menu toc";
  }
  .documentation-toc {
    position: relative;
    top: auto;
    max-height: none;
  }
}
@media (max-width: 992px) {
  .documentation-app {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "menu" "editor" "toc";
  }
  .documentation-menu {
    min-height: auto;
  }
  .documentation-menu__list {
    max-height: 320px;
  }
  .documentation-toc {
    position: relative;
    max-height: none;
  }
}
@media (max-width: 768px) {
  .documentation-hero {
    flex-direction: column;
    gap: 1.5rem;
    padding: 2rem;
  }
  .documentation-hero__content {
    max-width: 100%;
  }
  .documentation-hero__visual {
    min-width: auto;
  }
}
/* =====================================================
   HTML Block - Custom Quill Blot
   ===================================================== */
.ql-html-block {
  position: relative;
  margin: 1.5rem 0;
  padding: 0;
  border: 2px dashed rgba(37, 99, 235, 0.25);
  border-radius: 16px;
  background: rgba(37, 99, 235, 0.03);
  transition: border-color 0.2s ease, background 0.2s ease;
}
.ql-html-block:hover {
  border-color: rgba(37, 99, 235, 0.4);
  background: rgba(37, 99, 235, 0.05);
}

.ql-html-block__content {
  padding: 1rem;
  min-height: 60px;
}
.ql-html-block__content iframe {
  max-width: 100%;
  border-radius: 12px;
}
.ql-html-block__content .calendly-inline-widget {
  min-width: 100% !important;
  border-radius: 12px;
  overflow: hidden;
}

.ql-html-block__overlay {
  position: absolute;
  top: 8px;
  right: 8px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 4px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(4px);
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  z-index: 10;
  pointer-events: none;
}

.ql-html-block:hover .ql-html-block__overlay {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.ql-html-block__edit-btn,
.ql-html-block__delete-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  padding: 0.4rem 0.6rem;
  border: none;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}

.ql-html-block__edit-btn {
  background: #2563eb;
  color: #ffffff;
}
.ql-html-block__edit-btn i {
  font-size: 0.85rem;
}
.ql-html-block__edit-btn:hover {
  background: #1d4ed8;
}

.ql-html-block__delete-btn {
  background: rgba(239, 68, 68, 0.1);
  color: #dc2626;
  padding: 0.4rem;
}
.ql-html-block__delete-btn i {
  font-size: 0.85rem;
}
.ql-html-block__delete-btn:hover {
  background: rgba(239, 68, 68, 0.2);
}

/* Toolbar HTML Block Button */
.ql-toolbar .ql-html-block {
  width: auto;
  padding: 0;
  margin: 0;
  border: none;
  background: transparent;
  position: static;
}
.ql-toolbar .ql-html-block:hover {
  border: none;
  background: transparent;
}

.ql-bubble .ql-toolbar .ql-html-block {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  color: rgba(255, 255, 255, 0.8);
  cursor: pointer;
}
.ql-bubble .ql-toolbar .ql-html-block:hover {
  color: #ffffff;
}
.ql-bubble .ql-toolbar .ql-html-block i {
  font-size: 1rem;
}

/* =====================================================
   HTML Block Modal
   ===================================================== */
.html-block-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}
.html-block-modal.is-visible {
  opacity: 1;
  visibility: visible;
}
.html-block-modal.is-visible .html-block-modal__dialog {
  transform: translateY(0) scale(1);
}
.html-block-modal.is-closing {
  opacity: 0;
}
.html-block-modal.is-closing .html-block-modal__dialog {
  transform: translateY(-10px) scale(0.98);
}

.html-block-modal__backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
}

.html-block-modal__dialog {
  position: relative;
  width: 100%;
  max-width: 720px;
  max-height: calc(100vh - 4rem);
  background: #ffffff;
  border-radius: 20px;
  box-shadow: 0 25px 50px rgba(15, 23, 42, 0.25);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(10px) scale(0.98);
  transition: transform 0.25s ease;
}

.html-block-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.15);
}

.html-block-modal__title {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0;
  color: var(--text-primary);
}
.html-block-modal__title i {
  color: #2563eb;
}

.html-block-modal__close {
  width: 36px;
  height: 36px;
  border: none;
  background: rgba(148, 163, 184, 0.1);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}
.html-block-modal__close:hover {
  background: rgba(239, 68, 68, 0.1);
  color: #dc2626;
}

.html-block-modal__body {
  flex: 1;
  padding: 1.5rem;
  overflow-y: auto;
}

.html-block-modal__hint {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin: 0 0 1rem;
  line-height: 1.5;
}

.html-block-modal__textarea {
  width: 100%;
  min-height: 240px;
  padding: 1rem;
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 12px;
  background: #f8fafc;
  font-family: "SF Mono", "Fira Code", "Monaco", monospace;
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--text-primary);
  resize: vertical;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.html-block-modal__textarea:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}
.html-block-modal__textarea::-moz-placeholder {
  color: rgba(148, 163, 184, 0.7);
}
.html-block-modal__textarea::placeholder {
  color: rgba(148, 163, 184, 0.7);
}

.html-block-modal__preview-toggle {
  margin-top: 1rem;
}

.html-block-modal__preview-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.9rem;
  border: none;
  background: rgba(37, 99, 235, 0.1);
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  color: #2563eb;
  cursor: pointer;
  transition: background 0.2s ease;
}
.html-block-modal__preview-btn:hover {
  background: rgba(37, 99, 235, 0.15);
}

.html-block-modal__preview {
  margin-top: 1rem;
  padding: 1rem;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 12px;
  background: #ffffff;
}
.html-block-modal__preview.is-hidden {
  display: none;
}

.html-block-modal__preview-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
}

.html-block-modal__preview-content {
  min-height: 100px;
  padding: 1rem;
  border: 1px dashed rgba(148, 163, 184, 0.3);
  border-radius: 8px;
  background: #fafbfc;
}
.html-block-modal__preview-content iframe {
  max-width: 100%;
}

.html-block-modal__footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  padding: 1.25rem 1.5rem;
  border-top: 1px solid rgba(148, 163, 184, 0.15);
  background: #fafbfc;
}

@media (max-width: 640px) {
  .html-block-modal {
    padding: 1rem;
  }
  .html-block-modal__dialog {
    max-height: calc(100vh - 2rem);
    border-radius: 16px;
  }
  .html-block-modal__textarea {
    min-height: 180px;
  }
}
/* components */
.c-datepicker-range {
  position: relative;
  width: 300px;
}
.c-datepicker-range__input {
  cursor: pointer;
  border-color: var(--border-color);
}
.c-datepicker-range__input:focus {
  border-color: #0d6efd;
  box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}
.c-datepicker-range__calendar {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  z-index: 99;
  padding: 1rem;
  margin-top: 4px;
}
.c-datepicker-range__calendar.is-hidden {
  display: none;
}
.c-datepicker-range__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}
.c-datepicker-range__header button {
  width: 32px;
  height: 32px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.c-datepicker-range__month-year {
  font-weight: 600;
  font-size: 1.1rem;
  color: #212529;
}
.c-datepicker-range__grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  margin-bottom: 1rem;
}
.c-datepicker-range__day-header {
  text-align: center;
  font-size: 0.875rem;
  font-weight: 600;
  color: #6c757d;
  padding: 8px 4px;
}
.c-datepicker-range__day {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.875rem;
  transition: all 0.2s ease;
}
.c-datepicker-range__day:hover {
  background-color: #f8f9fa;
}
.c-datepicker-range__day.is-other-month {
  color: #adb5bd;
}
.c-datepicker-range__day.is-disabled {
  color: #adb5bd;
  cursor: not-allowed;
}
.c-datepicker-range__day.is-disabled:hover {
  background-color: transparent;
}
.c-datepicker-range__day.is-selected {
  background-color: #0d6efd;
  color: white;
}
.c-datepicker-range__day.is-in-range {
  background-color: rgba(13, 110, 253, 0.1);
}
.c-datepicker-range__day.is-start-date, .c-datepicker-range__day.is-end-date {
  background-color: #0d6efd;
  color: white;
  font-weight: 600;
}
.c-datepicker-range__presets {
  margin-bottom: 1rem;
}
.c-datepicker-range__presets button {
  display: block;
  width: 100%;
  padding: 8px 12px;
  margin-bottom: 4px;
  text-align: left;
  border: 1px solid #dee2e6;
  background: white;
  border-radius: 4px;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s ease;
}
.c-datepicker-range__presets button:hover {
  background-color: #f8f9fa;
  border-color: #0d6efd;
}
.c-datepicker-range__presets button:last-child {
  margin-bottom: 0;
}
.c-datepicker-range__actions {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

/* DataTables - Gestion des largeurs de colonnes */
.table-responsive table {
  table-layout: auto;
  width: 100%;
}
.table-responsive table thead th {
  white-space: nowrap;
  vertical-align: middle;
}
.table-responsive table tbody td {
  vertical-align: middle;
}

/* Tableau Clients */
#clientsTable thead th:nth-child(1),
#clientsTable tbody td:nth-child(1) {
  max-width: 390px;
  width: 390px;
}
#clientsTable thead th:nth-child(2),
#clientsTable tbody td:nth-child(2) {
  width: 12%;
}
#clientsTable thead th:nth-child(3),
#clientsTable tbody td:nth-child(3) {
  width: 10%;
}
#clientsTable thead th:nth-child(4),
#clientsTable tbody td:nth-child(4) {
  width: 12%;
}
#clientsTable thead th:nth-child(5),
#clientsTable tbody td:nth-child(5) {
  width: 12%;
}
#clientsTable thead th:nth-child(6),
#clientsTable tbody td:nth-child(6) {
  width: 10%;
}
#clientsTable thead th:nth-child(7),
#clientsTable tbody td:nth-child(7) {
  width: 10%;
}
#clientsTable thead th:nth-child(8),
#clientsTable tbody td:nth-child(8) {
  width: 10%;
  text-align: center;
}

/* Tableau Contacts */
#contactsTable thead th:nth-child(1),
#contactsTable tbody td:nth-child(1) {
  max-width: 390px;
  width: 390px;
}
#contactsTable thead th:nth-child(2),
#contactsTable tbody td:nth-child(2) {
  width: 15%;
}
#contactsTable thead th:nth-child(3),
#contactsTable tbody td:nth-child(3) {
  width: 20%;
}
#contactsTable thead th:nth-child(4),
#contactsTable tbody td:nth-child(4) {
  width: 12%;
}
#contactsTable thead th:nth-child(5),
#contactsTable tbody td:nth-child(5) {
  width: 18%;
}
#contactsTable thead th:nth-child(6),
#contactsTable tbody td:nth-child(6) {
  width: 15%;
}
#contactsTable thead th:nth-child(7),
#contactsTable tbody td:nth-child(7) {
  width: 10%;
  text-align: center;
}

/* Tableau Deals */
#dealsTable thead th:nth-child(1),
#dealsTable tbody td:nth-child(1) {
  max-width: 390px;
  width: 390px;
}
#dealsTable thead th:nth-child(2),
#dealsTable tbody td:nth-child(2) {
  width: 12%;
}
#dealsTable thead th:nth-child(3),
#dealsTable tbody td:nth-child(3) {
  width: 12%;
}
#dealsTable thead th:nth-child(4),
#dealsTable tbody td:nth-child(4) {
  width: 10%;
}
#dealsTable thead th:nth-child(5),
#dealsTable tbody td:nth-child(5) {
  width: 10%;
}
#dealsTable thead th:nth-child(6),
#dealsTable tbody td:nth-child(6) {
  width: 8%;
}
#dealsTable thead th:nth-child(7),
#dealsTable tbody td:nth-child(7) {
  width: 10%;
}
#dealsTable thead th:nth-child(8),
#dealsTable tbody td:nth-child(8) {
  width: 10%;
}
#dealsTable thead th:nth-child(9),
#dealsTable tbody td:nth-child(9) {
  width: 10%;
}
#dealsTable thead th:nth-child(10),
#dealsTable tbody td:nth-child(10) {
  width: 8%;
  text-align: center;
}

/* Tableau Products */
#productsTable thead th:nth-child(1),
#productsTable tbody td:nth-child(1) {
  max-width: 390px;
  width: 390px;
}
#productsTable thead th:nth-child(2),
#productsTable tbody td:nth-child(2) {
  width: 12%;
}
#productsTable thead th:nth-child(3),
#productsTable tbody td:nth-child(3) {
  width: 15%;
}
#productsTable thead th:nth-child(4),
#productsTable tbody td:nth-child(4) {
  width: 12%;
}
#productsTable thead th:nth-child(5),
#productsTable tbody td:nth-child(5) {
  width: 12%;
}
#productsTable thead th:nth-child(6),
#productsTable tbody td:nth-child(6) {
  width: 12%;
}
#productsTable thead th:nth-child(7),
#productsTable tbody td:nth-child(7) {
  width: 10%;
  text-align: center;
}

/* Tableau Reminders */
#remindersTable thead th:nth-child(1),
#remindersTable tbody td:nth-child(1) {
  max-width: 390px;
  width: 390px;
}
#remindersTable thead th:nth-child(2),
#remindersTable tbody td:nth-child(2) {
  width: 10%;
}
#remindersTable thead th:nth-child(3),
#remindersTable tbody td:nth-child(3) {
  width: 15%;
}
#remindersTable thead th:nth-child(4),
#remindersTable tbody td:nth-child(4) {
  width: 10%;
}
#remindersTable thead th:nth-child(5),
#remindersTable tbody td:nth-child(5) {
  width: 12%;
}
#remindersTable thead th:nth-child(6),
#remindersTable tbody td:nth-child(6) {
  width: 12%;
}
#remindersTable thead th:nth-child(7),
#remindersTable tbody td:nth-child(7) {
  width: 12%;
}
#remindersTable thead th:nth-child(8),
#remindersTable tbody td:nth-child(8) {
  width: 10%;
  text-align: center;
}

/* Tableau Users */
#usersTable thead th:nth-child(1),
#usersTable tbody td:nth-child(1) {
  max-width: 390px;
  width: 390px;
}
#usersTable thead th:nth-child(2),
#usersTable tbody td:nth-child(2) {
  width: 20%;
}
#usersTable thead th:nth-child(3),
#usersTable tbody td:nth-child(3) {
  width: 12%;
}
#usersTable thead th:nth-child(4),
#usersTable tbody td:nth-child(4) {
  width: 10%;
}
#usersTable thead th:nth-child(5),
#usersTable tbody td:nth-child(5) {
  width: 15%;
}
#usersTable thead th:nth-child(6),
#usersTable tbody td:nth-child(6) {
  width: 12%;
}
#usersTable thead th:nth-child(7),
#usersTable tbody td:nth-child(7) {
  width: 10%;
  text-align: center;
}

table td {
  overflow: hidden;
  text-overflow: ellipsis;
}
table td:first-child {
  white-space: normal;
  word-wrap: break-word;
}

@media (max-width: 768px) {
  #clientsTable thead th:nth-child(1),
  #clientsTable tbody td:nth-child(1),
  #contactsTable thead th:nth-child(1),
  #contactsTable tbody td:nth-child(1),
  #dealsTable thead th:nth-child(1),
  #dealsTable tbody td:nth-child(1),
  #productsTable thead th:nth-child(1),
  #productsTable tbody td:nth-child(1),
  #remindersTable thead th:nth-child(1),
  #remindersTable tbody td:nth-child(1),
  #usersTable thead th:nth-child(1),
  #usersTable tbody td:nth-child(1) {
    max-width: none;
    width: auto;
  }
  #clientsTable thead th:not(:first-child),
  #clientsTable tbody td:not(:first-child),
  #contactsTable thead th:not(:first-child),
  #contactsTable tbody td:not(:first-child),
  #dealsTable thead th:not(:first-child),
  #dealsTable tbody td:not(:first-child),
  #productsTable thead th:not(:first-child),
  #productsTable tbody td:not(:first-child),
  #remindersTable thead th:not(:first-child),
  #remindersTable tbody td:not(:first-child),
  #usersTable thead th:not(:first-child),
  #usersTable tbody td:not(:first-child) {
    width: auto;
  }
}
.pro-table-root {
  position: relative;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.pt-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid #e5e7eb;
  background: #ffffff;
  position: relative;
  flex-wrap: wrap;
  border-radius: 10px 10px 0 0;
}

.pt-toolbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 200px;
}

.pt-toolbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.pt-search {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 360px;
  background: #f3f4f6;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0 12px;
  transition: all 0.15s ease;
}
.pt-search:focus-within {
  background: #ffffff;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}
.pt-search .ti-search {
  color: #9ca3af;
  font-size: 16px;
  flex-shrink: 0;
}
.pt-search input {
  border: none;
  background: transparent;
  outline: none;
  font-size: 13.5px;
  padding: 9px 8px;
  width: 100%;
  color: #1f2937;
}
.pt-search input::-moz-placeholder {
  color: #9ca3af;
}
.pt-search input::placeholder {
  color: #9ca3af;
}

.pt-search-shortcut {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-family: inherit;
  background: #e5e7eb;
  color: #6b7280;
  border-radius: 4px;
  padding: 1px 6px;
  line-height: 18px;
  flex-shrink: 0;
}

.pt-tb-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #ffffff;
  color: #374151;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
  white-space: nowrap;
}
.pt-tb-btn .ti {
  font-size: 16px;
  color: #6b7280;
}
.pt-tb-btn:hover {
  background: #f9fafb;
  border-color: #d1d5db;
}

.pt-filter-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #3b82f6;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  border-radius: 10px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
}

.pt-perpage-btn {
  padding: 0;
  border: none;
  background: none;
}

.pt-perpage-select {
  padding: 8px 30px 8px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #ffffff;
  font-size: 13px;
  font-weight: 500;
  color: #374151;
  cursor: pointer;
  -webkit-appearance: none;
     -moz-appearance: none;
          appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%236B7280' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
}
.pt-perpage-select:hover {
  border-color: #d1d5db;
}
.pt-perpage-select:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.pt-add-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border: none;
  border-radius: 8px;
  background: #3b82f6;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.pt-add-btn .ti {
  font-size: 16px;
}
.pt-add-btn:hover {
  background: rgb(19.9912195122, 105.1219512195, 244.2087804878);
  transform: translateY(-1px);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
}
.pt-add-btn:active {
  transform: translateY(0);
}

.pt-filter-panel,
.pt-colmgr-panel {
  position: absolute;
  top: 100%;
  right: 20px;
  z-index: 50;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
  padding: 18px;
  min-width: 340px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: all 0.2s ease;
}
.pt-filter-panel.is-open,
.pt-colmgr-panel.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(4px);
}

.pt-fp-title, .pt-cm-title {
  font-size: 14px;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
}

.pt-fp-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}

.pt-fp-field label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: #6b7280;
  margin-bottom: 4px;
}
.pt-fp-field input, .pt-fp-field select {
  width: 100%;
  padding: 7px 10px;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  font-size: 13px;
  color: #1f2937;
  background: #ffffff;
  transition: border-color 0.15s ease;
}
.pt-fp-field input:focus, .pt-fp-field select:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.08);
}
.pt-fp-field input::-moz-placeholder, .pt-fp-field select::-moz-placeholder {
  color: #d1d5db;
}
.pt-fp-field input::placeholder, .pt-fp-field select::placeholder {
  color: #d1d5db;
}

.pt-fp-actions {
  display: flex;
  gap: 8px;
}
.pt-fp-actions button {
  flex: 1;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: all 0.15s ease;
}
.pt-fp-actions .pt-fp-apply {
  background: #3b82f6;
  color: #fff;
}
.pt-fp-actions .pt-fp-apply:hover {
  background: rgb(19.9912195122, 105.1219512195, 244.2087804878);
}
.pt-fp-actions .pt-fp-clear {
  background: #f3f4f6;
  color: #374151;
  border: 1px solid #e5e7eb;
}
.pt-fp-actions .pt-fp-clear:hover {
  background: #e5e7eb;
}

.pt-cm-hint {
  font-size: 12px;
  color: #9ca3af;
  margin-bottom: 10px;
}

.pt-cm-list {
  max-height: 340px;
  overflow-y: auto;
}

.pt-cm-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 8px;
  border-radius: 6px;
  cursor: grab;
  transition: background 0.15s ease;
}
.pt-cm-item:hover {
  background: #f9fafb;
}
.pt-cm-item.is-dragging {
  opacity: 0.4;
}
.pt-cm-item.drag-over {
  background: #dbeafe;
}
.pt-cm-item .pt-cm-drag {
  color: #d1d5db;
  font-size: 16px;
  cursor: grab;
}
.pt-cm-item .pt-cm-drag:active {
  cursor: grabbing;
}
.pt-cm-item label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #1f2937;
  cursor: pointer;
  flex: 1;
}
.pt-cm-item label input[type=checkbox] {
  width: 16px;
  height: 16px;
  accent-color: #3b82f6;
  cursor: pointer;
}
.pt-cm-item label .ti {
  color: #9ca3af;
  font-size: 15px;
}

.pt-wrapper {
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
}
.pt-wrapper::-webkit-scrollbar {
  height: 6px;
}
.pt-wrapper::-webkit-scrollbar-track {
  background: #f3f4f6;
}
.pt-wrapper::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 3px;
}
.pt-wrapper::-webkit-scrollbar-thumb:hover {
  background: #9ca3af;
}

.pt-table {
  width: -moz-max-content;
  width: max-content;
  min-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.pt-th {
  padding: 10px 16px;
  background: #f9fafb;
  border-bottom: 1px solid #e5e7eb;
  text-align: left;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  position: relative;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
}
.pt-th.pt-sticky-left, .pt-th.pt-sticky-name {
  position: sticky;
  z-index: 3;
  background: #f9fafb;
}
.pt-th.pt-sticky-left {
  left: 0;
}
.pt-th.pt-sticky-name {
  left: 44px;
}
.pt-th.pt-sticky-right {
  position: sticky;
  right: 0;
  z-index: 3;
  background: #f9fafb;
}

.pt-th-cb {
  width: 44px;
  min-width: 44px;
  max-width: 44px;
  text-align: center;
  padding: 10px 0;
}

.pt-th-actions {
  width: 110px;
  min-width: 110px;
  text-align: center;
}

.pt-th-inner {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.pt-th-inner.pt-sortable {
  cursor: pointer;
}
.pt-th-inner.pt-sortable:hover {
  color: #1f2937;
}
.pt-th-inner .ti {
  font-size: 14px;
}

.pt-sort-icon {
  display: inline-flex;
}
.pt-sort-icon .ti {
  font-size: 14px;
  color: #d1d5db;
}
.pt-sort-icon .ti-chevron-up, .pt-sort-icon .ti-chevron-down {
  color: #3b82f6;
}

.pt-td {
  padding: 12px 16px;
  border-bottom: 1px solid #f3f4f6;
  font-size: 13.5px;
  color: #1f2937;
  vertical-align: middle;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  background: #ffffff;
  transition: background 0.15s ease;
}
.pt-td.pt-sticky-left, .pt-td.pt-sticky-name {
  position: sticky;
  z-index: 2;
  background: #ffffff;
}
.pt-td.pt-sticky-left {
  left: 0;
}
.pt-td.pt-sticky-name {
  left: 44px;
}
.pt-td.pt-sticky-right {
  position: sticky;
  right: 0;
  z-index: 2;
  background: #ffffff;
}

.pt-td-cb {
  width: 44px;
  min-width: 44px;
  max-width: 44px;
  text-align: center;
  padding: 12px 0;
}

.pt-td-actions {
  text-align: center;
}

.pt-row:hover .pt-td {
  background: #f8fafc;
}
.pt-row.is-selected .pt-td {
  background: #eff6ff;
}
.pt-row:last-child .pt-td {
  border-bottom: none;
}

.pt-cb-all, .pt-cb-row {
  width: 16px;
  height: 16px;
  accent-color: #3b82f6;
  cursor: pointer;
  border-radius: 4px;
}

.pt-company-cell {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.pt-avatar {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  letter-spacing: 0.02em;
}

.pt-company-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

a.pt-company-name {
  font-weight: 600;
  color: #1f2937;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
  text-decoration: none;
  display: block;
}
a.pt-company-name:hover {
  color: #3b82f6;
}

a.pt-avatar {
  text-decoration: none;
  color: #fff;
}

.pt-cell-sub {
  font-size: 12px;
  color: #9ca3af;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

.pt-cell-muted {
  color: #d1d5db;
  font-size: 13px;
}

.pt-status-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  letter-spacing: 0.01em;
}

.pt-score-cell {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pt-score-bar {
  width: 60px;
  height: 5px;
  background: #e5e7eb;
  border-radius: 3px;
  overflow: hidden;
  flex-shrink: 0;
}

.pt-score-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.3s ease;
}

.pt-score-val {
  font-size: 13px;
  font-weight: 600;
  color: #1f2937;
  min-width: 32px;
}

.pt-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  border-radius: 5px;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
  margin: 1px 2px;
  letter-spacing: 0.01em;
}

.pt-link {
  color: #3b82f6;
  text-decoration: none;
  font-size: 13px;
}
.pt-link:hover {
  text-decoration: underline;
}

.pt-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.pt-act-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: #9ca3af;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
  font-size: 16px;
  padding: 0;
}
.pt-act-btn:hover {
  background: #f3f4f6;
  color: #1f2937;
  border-color: #e5e7eb;
}
.pt-act-btn.pt-act-danger:hover {
  background: #fef2f2;
  color: #ef4444;
  border-color: #fecaca;
}

.pt-editing {
  overflow: visible !important;
}

.pt-edit-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}

.pt-inline-edit {
  padding: 5px 8px;
  border: 1px solid #3b82f6;
  border-radius: 6px;
  font-size: 13px;
  color: #1f2937;
  background: #ffffff;
  outline: none;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
  min-width: 80px;
  max-width: 200px;
  width: 100%;
}

.pt-edit-actions {
  display: flex;
  gap: 3px;
  flex-shrink: 0;
}

.pt-edit-save, .pt-edit-cancel {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 5px;
  border: none;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.15s ease;
}

.pt-edit-save {
  background: #d1fae5;
  color: #065f46;
}
.pt-edit-save:hover {
  background: #a7f3d0;
}

.pt-edit-cancel {
  background: #fee2e2;
  color: #991b1b;
}
.pt-edit-cancel:hover {
  background: #fecaca;
}

.pt-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  border-top: 1px solid #e5e7eb;
  background: #ffffff;
  border-radius: 0 0 10px 10px;
}

.pt-info {
  font-size: 13px;
  color: #6b7280;
  font-weight: 500;
}

.pt-pagination {
  display: flex;
  align-items: center;
  gap: 4px;
}

.pt-pg-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  padding: 0 8px;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  background: #ffffff;
  color: #374151;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}
.pt-pg-btn:hover:not(:disabled):not(.is-active) {
  background: #f9fafb;
  border-color: #d1d5db;
}
.pt-pg-btn.is-active {
  background: #3b82f6;
  border-color: #3b82f6;
  color: #fff;
}
.pt-pg-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.pt-pg-btn .ti {
  font-size: 16px;
}

.pt-pg-dots {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  font-size: 13px;
  color: #9ca3af;
}

.pt-empty-cell {
  padding: 60px 20px !important;
  text-align: center;
}

.pt-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.pt-empty .ti {
  font-size: 48px;
  color: #e5e7eb;
}
.pt-empty p {
  font-size: 15px;
  color: #9ca3af;
  margin: 0;
}

.pt-empty-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border: none;
  border-radius: 8px;
  background: #3b82f6;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 6px;
  transition: all 0.15s ease;
}
.pt-empty-btn:hover {
  background: rgb(19.9912195122, 105.1219512195, 244.2087804878);
}

.pt-loading-cell {
  padding: 50px 20px !important;
  text-align: center;
  color: #9ca3af;
  font-size: 14px;
  display: flex !important;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.pt-spinner {
  width: 28px;
  height: 28px;
  border: 3px solid #e5e7eb;
  border-top-color: #3b82f6;
  border-radius: 50%;
  animation: pt-spin 0.6s linear infinite;
}

@keyframes pt-spin {
  to {
    transform: rotate(360deg);
  }
}
.pt-snackbar {
  position: fixed;
  bottom: -80px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  transition: bottom 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.pt-snackbar.is-visible {
  bottom: 24px;
}

.pt-snack-content {
  display: flex;
  align-items: center;
  gap: 16px;
  background: #1f2937;
  color: #fff;
  padding: 12px 20px;
  border-radius: 12px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.18);
  white-space: nowrap;
}

.pt-snack-count {
  font-size: 13px;
  font-weight: 600;
  padding-right: 8px;
  border-right: 1px solid rgba(255, 255, 255, 0.15);
}

.pt-snack-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.pt-snack-btn {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border: none;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}
.pt-snack-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}
.pt-snack-btn.pt-snack-danger {
  color: #fca5a5;
}
.pt-snack-btn.pt-snack-danger:hover {
  background: rgba(239, 68, 68, 0.25);
}

.pt-snack-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  color: #9ca3af;
  cursor: pointer;
  margin-left: 4px;
  transition: all 0.15s ease;
}
.pt-snack-close:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

.pt-notif {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.pt-notif-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 500;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
  pointer-events: auto;
  opacity: 0;
  transform: translateX(20px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.pt-notif-item.is-visible {
  opacity: 1;
  transform: translateX(0);
}
.pt-notif-item .ti {
  font-size: 18px;
  flex-shrink: 0;
}

.pt-notif-success {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}
.pt-notif-success .ti {
  color: #10b981;
}

.pt-notif-error {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}
.pt-notif-error .ti {
  color: #ef4444;
}

.pt-notif-info {
  background: #eff6ff;
  color: #1e40af;
  border: 1px solid #bfdbfe;
}
.pt-notif-info .ti {
  color: #3b82f6;
}

.pt-sticky-name::after {
  content: "";
  position: absolute;
  top: 0;
  right: -8px;
  bottom: 0;
  width: 8px;
  background: linear-gradient(to right, rgba(0, 0, 0, 0.04), transparent);
  pointer-events: none;
}

.pt-sticky-right::before {
  content: "";
  position: absolute;
  top: 0;
  left: -8px;
  bottom: 0;
  width: 8px;
  background: linear-gradient(to left, rgba(0, 0, 0, 0.04), transparent);
  pointer-events: none;
}

@media (max-width: 768px) {
  .pt-toolbar {
    padding: 10px 14px;
    gap: 8px;
  }
  .pt-toolbar-right span {
    display: none;
  }
  .pt-add-btn span {
    display: none;
  }
  .pt-search {
    max-width: 100%;
  }
  .pt-search-shortcut {
    display: none;
  }
  .pt-filter-panel,
  .pt-colmgr-panel {
    right: 10px;
    left: 10px;
    min-width: auto;
  }
  .pt-fp-grid {
    grid-template-columns: 1fr;
  }
  .pt-snack-content {
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 14px;
  }
  .pt-snack-count {
    border-right: none;
    padding-right: 0;
  }
  .pt-snack-actions {
    flex-wrap: wrap;
  }
}
.pt-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 8px 16px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #ffffff;
  color: #6b7280;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.pt-tab-btn .ti {
  font-size: 16px;
}
.pt-tab-btn:hover {
  background: #f9fafb;
  border-color: #d1d5db;
  color: #1f2937;
}
.pt-tab-btn.active {
  background: rgba(59, 130, 246, 0.08);
  border-color: #3b82f6;
  color: #3b82f6;
  font-weight: 600;
}

.pt-trash-link {
  display: inline-flex;
  align-items: center;
  font-size: 13px;
  color: #c4c8cf;
  text-decoration: none !important;
  white-space: nowrap;
  transition: color 0.15s ease;
}
.pt-trash-link:hover {
  color: #9ca3af;
}

.pt-act-btn.pt-act-restore {
  color: #6b7280;
}
.pt-act-btn.pt-act-restore:hover {
  background: #ecfdf5;
  color: #10b981;
  border-color: #a7f3d0;
}

.pt-snack-btn.pt-snack-restore {
  color: #6ee7b7;
}
.pt-snack-btn.pt-snack-restore:hover {
  background: rgba(16, 185, 129, 0.25);
}

.pt-breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  font-size: 13px;
}

.pt-breadcrumb-link {
  color: #9ca3af;
  text-decoration: none;
  transition: color 0.15s ease;
}
.pt-breadcrumb-link:hover {
  color: #3b82f6;
}

.pt-breadcrumb-sep {
  color: #d1d5db;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
}

.pt-breadcrumb-current {
  color: #1f2937;
  font-weight: 500;
}

/* Builder layout (templates & campagnes) */
.builder-layout {
  display: flex;
  gap: 0;
  background: #eef2ff;
  border-radius: 18px;
  border: 1px solid rgba(99, 102, 241, 0.15);
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  overflow: hidden;
}
.builder-layout .builder-panel {
  width: 280px;
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
  padding: 1.5rem;
  border-right: 1px solid rgba(148, 163, 184, 0.25);
}
.builder-layout .builder-panel:last-child {
  border-right: none;
  border-left: 1px solid rgba(148, 163, 184, 0.25);
}
.builder-layout .builder-panel h6 {
  letter-spacing: 0.12em;
  font-size: 0.75rem;
  font-weight: 700;
  color: #64748b;
}
.builder-layout .builder-canvas-wrapper {
  flex: 1;
  min-width: 0;
  max-height: calc(100vh - 300px);
  overflow-y: auto;
  padding: 2rem;
  background: linear-gradient(160deg, rgba(59, 130, 246, 0.08) 0%, rgba(236, 72, 153, 0.08) 100%);
}

/* Palette */
.builder-palette h6 {
  margin-bottom: 0.5rem;
  padding-left: 0.25rem;
}
.builder-palette .builder-block {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  padding: 0.55rem 0.75rem;
  border-radius: 10px;
  background: #ffffff;
  margin-bottom: 0.45rem;
  cursor: grab;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  font-weight: 500;
  font-size: 0.85rem;
  color: #334155;
}
.builder-palette .builder-block i {
  font-size: 1.05rem;
  color: #6366f1;
  flex-shrink: 0;
}
.builder-palette .builder-block:hover {
  border-color: #6366f1;
  box-shadow: 0 6px 14px rgba(99, 102, 241, 0.12);
  transform: translateY(-1px);
  color: #4f46e5;
}
.builder-palette .builder-block:active {
  cursor: grabbing;
}

/* Canvas */
.builder-canvas {
  min-height: 620px;
  background: #f8fafc;
  border-radius: 18px;
  padding: 2rem;
  box-shadow: inset 0 0 0 1px rgba(59, 66, 130, 0.08);
  transition: background 0.25s ease, box-shadow 0.25s ease, padding 0.25s ease;
}

/* Mode "Simple" : look email perso (Gmail/Outlook), pleine largeur, police système */
.builder-canvas--simple {
  background: #ffffff;
  border-radius: 8px;
  padding: 24px 28px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: #202124;
}
.builder-canvas--simple .builder-section {
  border: none !important;
  box-shadow: none !important;
  margin-bottom: 0.5rem;
}
.builder-canvas--simple .builder-section.is-selected {
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.18) !important;
  border-radius: 6px !important;
}
.builder-canvas--simple .builder-section-header {
  font-size: 0.72rem;
}
.builder-canvas--simple .builder-section-body {
  border: none !important;
  border-radius: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  gap: 0 !important;
}
.builder-canvas--simple .builder-column {
  padding: 0 !important;
  min-height: 0;
}
.builder-canvas--simple .builder-column.is-selected {
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
  border-radius: 4px;
}
.builder-canvas--simple .builder-block-item {
  border: 1px dashed transparent;
  padding: 4px 6px;
}
.builder-canvas--simple .builder-block-item:hover {
  border-color: rgba(99, 102, 241, 0.3);
}
.builder-canvas--simple .builder-block-text a {
  color: #1a73e8;
}

.builder-canvas-wrapper--simple {
  background: linear-gradient(160deg, #f8fafc 0%, #f1f5f9 100%);
}

/* Dropzone image dans l'inspecteur (bloc image) — clic ouvre le media picker
   (offcanvas avec bibliothèque + Unsplash + upload). */
.builder-image-dropzone {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 140px;
  padding: 0;
  border: 1.5px dashed rgba(99, 102, 241, 0.45);
  border-radius: 12px;
  background: #f8fafc;
  cursor: pointer;
  overflow: hidden;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.builder-image-dropzone:hover, .builder-image-dropzone:focus-visible {
  border-color: #6366f1;
  background: #eef2ff;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.12);
  outline: none;
}
.builder-image-dropzone__preview {
  display: block;
  width: 100%;
  height: auto;
  max-height: 220px;
  -o-object-fit: contain;
     object-fit: contain;
  background: #ffffff;
}
.builder-image-dropzone__overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.75rem;
  background: rgba(15, 23, 42, 0.55);
  color: #ffffff;
  font-size: 0.85rem;
  font-weight: 500;
  opacity: 0;
  transition: opacity 0.15s ease;
}
.builder-image-dropzone__overlay i {
  font-size: 1.5rem;
}
.builder-image-dropzone.has-image {
  border-style: solid;
  border-color: rgba(148, 163, 184, 0.35);
  background: #ffffff;
  cursor: pointer;
}
.builder-image-dropzone.has-image:hover .builder-image-dropzone__overlay, .builder-image-dropzone.has-image:focus-visible .builder-image-dropzone__overlay {
  opacity: 1;
}
.builder-image-dropzone__empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 1.25rem 1rem;
  text-align: center;
  color: #64748b;
}
.builder-image-dropzone__empty i {
  font-size: 1.75rem;
  color: #6366f1;
}
.builder-image-dropzone__title {
  font-size: 0.9rem;
  font-weight: 600;
  color: #334155;
}
.builder-image-dropzone__hint {
  font-size: 0.75rem;
  color: #94a3b8;
}
.builder-image-dropzone.is-loading {
  pointer-events: none;
  opacity: 0.6;
}
.builder-image-dropzone.is-loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 28px;
  height: 28px;
  margin: -14px 0 0 -14px;
  border: 3px solid rgba(99, 102, 241, 0.25);
  border-top-color: #6366f1;
  border-radius: 50%;
  animation: builderImageDropzoneSpin 0.8s linear infinite;
}

@keyframes builderImageDropzoneSpin {
  to {
    transform: rotate(360deg);
  }
}
/* Toggle de style d'email (Newsletter / Simple) */
.builder-style-toggle {
  display: inline-flex;
  background: #f1f5f9;
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 8px;
  padding: 3px;
  gap: 2px;
}
.builder-style-toggle .btn {
  border: none;
  background: transparent;
  color: #64748b;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}
.builder-style-toggle .btn i {
  font-size: 1rem;
}
.builder-style-toggle .btn-check:checked + .btn {
  background: #ffffff;
  color: #1f2937;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08), 0 0 0 1px rgba(99, 102, 241, 0.18);
}
.builder-style-toggle .btn:hover {
  color: #1f2937;
}

/* Sections */
.builder-section {
  position: relative;
  border: 2px dashed transparent;
  border-radius: 18px;
  margin-bottom: 1.75rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.builder-section.is-selected {
  border-color: #6366f1;
  box-shadow: 0 0 0 6px rgba(99, 102, 241, 0.15);
}
.builder-section .builder-section-header {
  position: absolute;
  top: -16px;
  left: 16px;
  margin: 0 !important;
  padding: 4px 10px !important;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 999px;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
  color: #475569;
  z-index: 4;
  opacity: 0;
  pointer-events: none;
  transform: translateY(4px);
  transition: opacity 0.15s ease, transform 0.15s ease;
  gap: 0.5rem;
}
.builder-section .builder-section-header .btn-group .btn {
  border-radius: 999px;
  border-color: rgba(148, 163, 184, 0.4);
  background: #ffffff;
}
.builder-section .builder-section-header .btn-group .btn:hover {
  border-color: #6366f1;
  color: #6366f1;
}
.builder-section.is-selected > .builder-section-header, .builder-section:hover:not(:has(.builder-column:hover, .builder-block-item:hover)) > .builder-section-header, .builder-section:focus-within:not(:has(.builder-column:focus-within, .builder-block-item:focus-within)) > .builder-section-header {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.builder-section .builder-section-body {
  display: flex;
  gap: 1.5rem;
  background: transparent;
  border-radius: 18px;
  border: 1px dashed rgba(148, 163, 184, 0.45);
  padding: 1.25rem;
}
.builder-section .builder-section-body.two-column .builder-column {
  width: 50%;
}
.builder-section .builder-section-body.one-column .builder-column {
  width: 100%;
}

/* Colonnes — fond transparent par défaut pour laisser apparaître le fond de section.
   Le fond éventuel défini par l'utilisateur est appliqué en inline style. */
.builder-column {
  border: 2px dashed transparent;
  border-radius: 14px;
  padding: 1.25rem;
  min-height: 200px;
  background: transparent;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  position: relative;
}
.builder-column.is-selected {
  border-color: rgba(99, 102, 241, 0.8);
  box-shadow: 0 0 0 5px rgba(99, 102, 241, 0.2);
}
.builder-column .builder-column-toolbar {
  position: absolute;
  top: -14px;
  left: 16px;
  margin: 0 !important;
  display: inline-flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  padding: 4px 8px 4px 10px;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 999px;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
  color: #475569;
  font-size: 0.78rem;
  z-index: 3;
  opacity: 0;
  pointer-events: none;
  transform: translateY(4px);
  transition: opacity 0.15s ease, transform 0.15s ease;
}
.builder-column .builder-column-toolbar .btn {
  border-radius: 999px;
  background: #ffffff;
}
.builder-column.is-selected > .builder-column-toolbar, .builder-column:hover:not(:has(.builder-block-item:hover)) > .builder-column-toolbar, .builder-column:focus-within:not(:has(.builder-block-item:focus-within)) > .builder-column-toolbar {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.builder-column .builder-block-item + .builder-block-item {
  margin-top: 1rem;
}

/* Dropzone — translucide pour s'adapter au fond de section */
.builder-dropzone {
  margin-top: 1rem;
  padding: 0.7rem;
  border: 1px dashed rgba(148, 163, 184, 0.55);
  border-radius: 10px;
  text-align: center;
  color: #64748b;
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  font-size: 0.85rem;
  font-style: italic;
}

.builder-drop-target {
  border-color: #6366f1 !important;
  background-color: rgba(99, 102, 241, 0.12) !important;
  position: relative;
}
.builder-drop-target[data-drop-position=before]::before {
  content: "";
  position: absolute;
  top: -2px;
  left: 0;
  right: 0;
  height: 4px;
  background: #6366f1;
  border-radius: 2px;
  z-index: 10;
}
.builder-drop-target[data-drop-position=after]::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 4px;
  background: #6366f1;
  border-radius: 2px;
  z-index: 10;
}

/* Blocs — transparents par défaut pour laisser voir le rendu final.
   Bordure fine subtile pour matérialiser le bloc, plus marquée au survol/sélection. */
.builder-block-item {
  background: transparent;
  border: 1px dashed rgba(148, 163, 184, 0.35);
  border-radius: 12px;
  padding: 0.75rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  position: relative;
}
.builder-block-item:hover {
  border-color: rgba(99, 102, 241, 0.5);
  border-style: solid;
}
.builder-block-item.is-selected {
  border-style: solid;
  border-color: #6366f1;
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.12);
}
.builder-block-item .builder-block-toolbar {
  position: absolute;
  top: -16px;
  right: 8px;
  margin: 0 !important;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 4px 8px 4px 10px;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 999px;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
  font-size: 0.78rem;
  z-index: 5;
  opacity: 0;
  pointer-events: none;
  transform: translateY(4px);
  transition: opacity 0.15s ease, transform 0.15s ease;
}
.builder-block-item .builder-block-toolbar .badge {
  background: rgba(99, 102, 241, 0.1) !important;
  color: #4f46e5 !important;
  border: 1px solid rgba(99, 102, 241, 0.2);
}
.builder-block-item .builder-block-toolbar .btn {
  border-radius: 999px;
  background: #ffffff;
  border-color: rgba(148, 163, 184, 0.4);
}
.builder-block-item .builder-block-toolbar .btn:hover {
  border-color: #6366f1;
  color: #6366f1;
}
.builder-block-item:hover > .builder-block-toolbar, .builder-block-item.is-selected > .builder-block-toolbar, .builder-block-item:focus-within > .builder-block-toolbar {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.builder-block-item .builder-block-content {
  color: inherit;
}

/* Petits blocs structurels (séparateur, espace) — visualisation fidèle */
.builder-block-divider hr {
  border: none;
  margin: 0;
  width: 100%;
}

.builder-block-spacer {
  width: 100%;
  display: block;
}

/* Quill — pas d'overflow:hidden ici, sinon la bulle "ajouter un lien"
   serait coupée par le conteneur. On arrondit les pièces internes à la place. */
.builder-quill {
  border: 1px solid rgba(148, 163, 184, 0.4);
  border-radius: 12px;
  position: relative;
}
.builder-quill .ql-toolbar.ql-snow {
  background: #f8fafc;
  border: none;
  border-bottom: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 12px 12px 0 0;
}
.builder-quill .ql-container.ql-snow {
  border: none;
  min-height: 200px;
  font-size: 15px;
  line-height: 1.7;
  border-radius: 0 0 12px 12px;
}

/* Bulle d'édition de lien Quill : doit toujours être visible au-dessus de tout */
.ql-tooltip {
  z-index: 1080;
  background: #ffffff !important;
  border: 1px solid rgba(148, 163, 184, 0.45) !important;
  border-radius: 8px !important;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.18) !important;
  padding: 8px 10px !important;
  white-space: nowrap;
}
.ql-tooltip input[type=text] {
  border: 1px solid rgba(148, 163, 184, 0.45) !important;
  border-radius: 6px !important;
  padding: 4px 8px !important;
  min-width: 220px;
}
.ql-tooltip a.ql-action,
.ql-tooltip a.ql-remove {
  color: #4f46e5 !important;
  margin-left: 8px;
}

/* Merge fields */
[data-merge-fields] .btn {
  border-radius: 999px;
  border-color: rgba(148, 163, 184, 0.5);
  font-size: 0.8rem;
  padding: 0.35rem 0.85rem;
}
[data-merge-fields] .btn:hover {
  border-color: #6366f1;
  color: #6366f1;
}

/* Responsive */
@media (max-width: 991px) {
  .builder-layout {
    flex-direction: column;
  }
  .builder-layout .builder-panel,
  .builder-layout .builder-inspector {
    width: 100%;
    border-right: none;
    border-left: none;
    border-bottom: 1px solid rgba(148, 163, 184, 0.25);
  }
  .builder-layout .builder-inspector {
    border-bottom: none;
  }
  .builder-canvas {
    padding: 1.25rem;
  }
}
/* Drag & drop */
.builder-section-drag-handle,
.builder-block-drag-handle {
  cursor: grab;
  color: #94a3b8;
  transition: color 0.2s ease;
  display: inline-flex;
  align-items: center;
  padding: 0.25rem;
}
.builder-section-drag-handle:hover,
.builder-block-drag-handle:hover {
  color: #6366f1;
}
.builder-section-drag-handle:active,
.builder-block-drag-handle:active {
  cursor: grabbing;
}

.builder-dragging {
  opacity: 0.5;
  cursor: grabbing !important;
}

.builder-drop-over {
  border-color: #10b981 !important;
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.15) !important;
  background-color: rgba(16, 185, 129, 0.05) !important;
}

.gs-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  max-width: 380px;
  background: #f3f4f6;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0 12px;
  height: 40px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.gs-trigger:hover {
  background: rgb(237.1714285714, 238.6571428571, 241.6285714286);
  border-color: #e5e7eb;
}
.gs-trigger .ti-search {
  color: #9ca3af;
  font-size: 16px;
  flex-shrink: 0;
}
.gs-trigger .gs-trigger-text {
  flex: 1;
  font-size: 13.5px;
  color: #9ca3af;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
}
.gs-trigger .gs-trigger-keys {
  display: flex;
  gap: 3px;
  flex-shrink: 0;
}
.gs-trigger .gs-trigger-keys kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-family: inherit;
  background: #e5e7eb;
  color: #6b7280;
  border-radius: 4px;
  padding: 1px 6px;
  line-height: 18px;
  border: none;
  box-shadow: none;
}

.gs-dialog {
  max-width: 640px;
}

.gs-modal {
  border: none !important;
  border-radius: 16px !important;
  overflow: hidden;
  box-shadow: 0 24px 48px -12px rgba(0, 0, 0, 0.18), 0 0 0 1px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  height: 380px;
}

.gs-input-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border-bottom: 1px solid #e5e7eb;
}

.gs-input-icon {
  font-size: 20px;
  color: #9ca3af;
  flex-shrink: 0;
}

.gs-input {
  flex: 1;
  border: none;
  background: transparent;
  outline: none;
  font-size: 15px;
  color: #1f2937;
  padding: 0;
  line-height: 1.5;
}
.gs-input::-moz-placeholder {
  color: #9ca3af;
}
.gs-input::placeholder {
  color: #9ca3af;
}

.gs-input-loader {
  flex-shrink: 0;
  display: none;
}
.gs-input-loader.visible {
  display: flex;
  align-items: center;
}
.gs-input-loader .spinner-border {
  width: 1rem;
  height: 1rem;
  border-width: 2px;
}

.gs-input-esc {
  flex-shrink: 0;
  font-size: 11px;
  font-family: inherit;
  background: #f3f4f6;
  color: #6b7280;
  border-radius: 5px;
  padding: 2px 8px;
  line-height: 18px;
  border: none;
  box-shadow: none;
  cursor: pointer;
}

.gs-results-wrap {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.gs-results-wrap::-webkit-scrollbar {
  width: 6px;
}
.gs-results-wrap::-webkit-scrollbar-track {
  background: transparent;
}
.gs-results-wrap::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 3px;
}

.gs-results .gs-group-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px 6px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #9ca3af;
  background: #ffffff;
  position: sticky;
  top: 0;
  z-index: 1;
}
.gs-results .gs-result-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 18px;
  text-decoration: none;
  color: #1f2937;
  transition: background 0.15s ease;
  cursor: pointer;
  border-left: 3px solid transparent;
}
.gs-results .gs-result-item:hover {
  background: #f8fafc;
}
.gs-results .gs-result-item.active {
  background: #eff6ff;
  border-left-color: #3b82f6;
}
.gs-results .gs-result-item.active .gs-result-title {
  color: #3b82f6;
}
.gs-results .gs-result-item.active .gs-result-badge {
  background: #3b82f6;
  color: #fff;
}
.gs-results .gs-result-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: #f3f4f6;
  color: #9ca3af;
  font-size: 16px;
  flex-shrink: 0;
}
.gs-results .gs-result-body {
  flex: 1;
  min-width: 0;
}
.gs-results .gs-result-title {
  font-size: 13.5px;
  font-weight: 600;
  color: #1f2937;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.gs-results .gs-result-subtitle {
  font-size: 12px;
  color: #9ca3af;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 1px;
}
.gs-results .gs-result-badge {
  flex-shrink: 0;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  background: #f3f4f6;
  color: #9ca3af;
  border-radius: 5px;
  padding: 3px 8px;
}

.gs-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 32px 18px;
  color: #9ca3af;
  font-size: 13px;
}

.gs-empty {
  text-align: center;
  padding: 40px 18px;
  color: #9ca3af;
}
.gs-empty .ti-search-off {
  font-size: 32px;
  display: block;
  margin-bottom: 8px;
  opacity: 0.5;
}
.gs-empty div {
  font-size: 14px;
  font-weight: 500;
  color: #1f2937;
}
.gs-empty small {
  font-size: 12px;
  color: #9ca3af;
}

.gs-footer {
  display: flex;
  align-items: center;
  padding: 10px 18px;
  border-top: 1px solid #e5e7eb;
  background: #fafbfc;
}

.gs-footer-hints {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 12px;
  color: #9ca3af;
}
.gs-footer-hints kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-family: inherit;
  font-weight: 500;
  background: #e5e7eb;
  color: #6b7280;
  border-radius: 4px;
  padding: 1px 5px;
  line-height: 16px;
  margin-right: 3px;
  border: none;
  box-shadow: none;
}

@media (max-width: 768px) {
  .gs-trigger {
    max-width: 100%;
  }
  .gs-trigger .gs-trigger-text {
    display: none;
  }
  .gs-trigger .gs-trigger-keys {
    display: none;
  }
  .gs-dialog {
    margin: 10px;
  }
}
/* Composant Password Toggle */
.password-toggle .input-group {
  position: relative;
}
.password-toggle .input-group .form-control {
  padding-right: 3rem;
  border-radius: 0.375rem 0 0 0.375rem;
}
.password-toggle .input-group .btn {
  border-radius: 0 0.375rem 0.375rem 0;
  border-left: 0;
  background: transparent;
  color: var(--text-muted);
  transition: color 0.2s ease;
}
.password-toggle .input-group .btn:hover {
  color: var(--primary-color);
  background-color: var(--hover-bg);
}
.password-toggle .input-group .btn:focus {
  box-shadow: 0 0 0 0.2rem rgba(59, 130, 246, 0.25);
}
.password-toggle .input-group .btn i {
  font-size: 1rem;
  line-height: 1;
}
.password-toggle .eye-icon {
  transition: opacity 0.2s ease;
}
.password-toggle .eye-icon.d-none {
  opacity: 0;
}
.password-toggle .password-strength {
  margin-top: 0.5rem;
}
.password-toggle .password-strength .password-strength-bar {
  height: 4px;
  border-radius: 2px;
  background-color: var(--border-color);
  overflow: hidden;
  position: relative;
}
.password-toggle .password-strength .password-strength-bar::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0;
  transition: width 0.3s ease, background-color 0.3s ease;
}
.password-toggle .password-strength.weak .password-strength-bar::after {
  width: 25%;
  background-color: #dc2626;
}
.password-toggle .password-strength.medium .password-strength-bar::after {
  width: 50%;
  background-color: #f59e0b;
}
.password-toggle .password-strength.strong .password-strength-bar::after {
  width: 100%;
  background-color: #10b981;
}

/* Styles pour les champs de mot de passe avec toggle */
[data-password-toggle] .form-control {
  padding-right: 3rem;
}
[data-password-toggle] .btn {
  position: absolute;
  right: 0;
  top: 0;
  height: 100%;
  z-index: 5;
  border: 1px solid var(--border-color);
  border-left: 0;
  background: white;
  color: var(--text-muted);
  transition: all 0.2s ease;
}
[data-password-toggle] .btn:hover {
  color: var(--primary-color);
  background-color: var(--hover-bg);
}
[data-password-toggle] .btn:focus {
  box-shadow: 0 0 0 0.2rem rgba(59, 130, 246, 0.25);
  z-index: 6;
}
[data-password-toggle] .btn i {
  font-size: 1rem;
}

/* Responsive */
@media (max-width: 768px) {
  .password-toggle .input-group .btn {
    padding: 0.5rem 0.75rem;
  }
}
#campaignEngagementSection .engagement-list-wrapper {
  max-height: 320px;
}
#campaignEngagementSection .engagement-list-wrapper ul {
  margin-bottom: 0;
}
#campaignEngagementSection .engagement-list-wrapper li:last-child {
  margin-bottom: 0;
}

.pt-enrich-ai {
  background: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%) !important;
  border: none !important;
  color: #fff !important;
  font-weight: 600 !important;
  gap: 6px;
  position: relative;
  overflow: hidden;
  transition: all 0.2s ease;
}
.pt-enrich-ai .ti {
  color: #fff !important;
  font-size: 17px;
}
.pt-enrich-ai:hover {
  background: linear-gradient(135deg, #6d28d9 0%, #9333ea 100%) !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(139, 92, 246, 0.35);
}
.pt-enrich-ai:active {
  transform: translateY(0);
}
.pt-enrich-ai.is-running {
  background: linear-gradient(135deg, #dc2626 0%, #ef4444 100%) !important;
}
.pt-enrich-ai.is-running:hover {
  background: linear-gradient(135deg, #b91c1c 0%, #dc2626 100%) !important;
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.35);
}

.pt-enrich-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: pt-spin 0.6s linear infinite;
}

.pt-enrich-progress {
  font-size: 11px;
  opacity: 0.85;
  font-weight: 500;
  margin-left: 2px;
}

.pt-serper-counter {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 8px;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
}

.pt-serper-label {
  color: #6b7280;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.pt-serper-count {
  color: #374151;
  font-variant-numeric: tabular-nums;
}

.pt-serper-bar {
  width: 40px;
  height: 6px;
  background: #e5e7eb;
  border-radius: 3px;
  overflow: hidden;
}

.pt-serper-bar-fill {
  height: 100%;
  border-radius: 3px;
  background: #10b981;
  transition: width 0.4s ease, background 0.3s ease;
  width: 0%;
}
.pt-serper-bar-fill.is-warning {
  background: #f59e0b;
}
.pt-serper-bar-fill.is-danger {
  background: #ef4444;
}

.pt-row.enrich-processing .pt-td {
  background: rgba(139, 92, 246, 0.08) !important;
  transition: background 0.3s ease;
}

.pt-row.enrich-processing .pt-td.pt-td-cb {
  box-shadow: inset 3px 0 0 #8b5cf6;
}

.pt-row.enrich-found .pt-td {
  background: rgba(16, 185, 129, 0.08) !important;
  transition: background 0.4s ease;
}

.pt-row.enrich-found .pt-td.pt-td-cb {
  box-shadow: inset 3px 0 0 #10b981;
}

.pt-row.enrich-complete .pt-td {
  background: rgba(59, 130, 246, 0.04) !important;
  transition: background 0.3s ease;
}

.pt-row.enrich-none .pt-td {
  background: rgba(156, 163, 175, 0.06) !important;
  transition: background 0.3s ease;
}

.pt-row.enrich-error .pt-td {
  background: rgba(239, 68, 68, 0.06) !important;
  transition: background 0.3s ease;
}

.pt-row.enrich-error .pt-td.pt-td-cb {
  box-shadow: inset 3px 0 0 #ef4444;
}

.enrich-tooltip {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 54px;
  z-index: 100;
  pointer-events: none;
  animation: enrichTooltipIn 0.3s ease forwards;
}

@keyframes enrichTooltipIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.enrich-tooltip-inner {
  background: #1f2937;
  color: #fff;
  padding: 8px 12px;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  font-size: 12px;
  white-space: nowrap;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.enrich-tooltip-inner::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 20px;
  width: 8px;
  height: 8px;
  background: #1f2937;
  transform: rotate(45deg);
}

.enrich-tooltip-fields {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.enrich-tooltip-field {
  display: inline-block;
  padding: 2px 7px;
  background: rgba(16, 185, 129, 0.2);
  color: #6ee7b7;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
}

.enrich-tooltip-via {
  font-size: 10px;
  color: #9ca3af;
}

.enrich-tooltip-source {
  display: inline-block;
  padding: 1px 5px;
  background: rgba(139, 92, 246, 0.2);
  color: #c4b5fd;
  border-radius: 3px;
  font-size: 10px;
  font-weight: 600;
  margin-left: 2px;
}

@media (max-width: 768px) {
  .pt-serper-counter {
    display: none;
  }
  .pt-enrich-ai span {
    display: none;
  }
  .enrich-tooltip {
    display: none;
  }
}
/* ─────────────────────────────────────────────────────────────────
   Import Offcanvas — wizard 3 étapes (drop, mapping, récap)

   Le squelette (conteneur, header, body, footer, stepper, panes) est
   fourni par components/_wizard-offcanvas.scss : on applique simplement
   .wizard-offcanvas + .wizard-offcanvas-wide sur l'offcanvas et on
   ajoute la classe hook .import-offcanvas pour les éléments
   spécifiques (dropzone, options, mapping grid, récap).
   ───────────────────────────────────────────────────────────────── */
/* ─── Dropdown du toolbar (bouton plus → menu d'import) ─── */
.import-menu {
  min-width: 280px;
  padding: 0.5rem 0;
}
.import-menu .dropdown-header {
  padding: 0.5rem 1rem;
  letter-spacing: 0.03em;
}
.import-menu .dropdown-item {
  padding: 0.55rem 1rem;
  font-size: 0.9rem;
}
.import-menu .dropdown-item i {
  font-size: 1rem;
  min-width: 18px;
  text-align: center;
}
.import-menu .dropdown-item:hover {
  background: #f3f4f6;
}

/* ─── Bouton dropdown sans caret (toolbar) ───────────────── */
.no-caret::after {
  display: none !important;
}

/* ─── Contenu spécifique import (scopé sous .import-offcanvas) ─── */
.import-offcanvas {
  /* ─── Dropzone ───────────────────────────────────────── */
}
.import-offcanvas .import-dropzone {
  border: 2px dashed #cbd5e1;
  border-radius: 14px;
  padding: 38px 20px;
  text-align: center;
  background: #f8fafc;
  cursor: pointer;
  transition: all 0.2s;
}
.import-offcanvas .import-dropzone:hover, .import-offcanvas .import-dropzone:focus, .import-offcanvas .import-dropzone.is-dragover {
  border-color: #4f46e5;
  background: #eef2ff;
  outline: none;
}
.import-offcanvas .import-dropzone-inner {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
}
.import-offcanvas .import-dropzone-icon {
  font-size: 2.6rem;
  color: #4f46e5;
}
.import-offcanvas .import-dropzone-title {
  font-weight: 600;
  color: #1f2937;
}
.import-offcanvas .import-dropzone-sub {
  color: #6b7280;
  font-size: 0.85rem;
}
.import-offcanvas .import-dropzone-hint {
  margin-top: 8px;
  color: #475569;
  font-size: 0.78rem;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #fff;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid #e5e7eb;
}
.import-offcanvas .import-dropzone-hint .import-template-link {
  color: #4f46e5;
  text-decoration: underline;
  margin-left: 2px;
}
.import-offcanvas .import-file-info {
  margin-top: 16px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 12px 14px;
}
.import-offcanvas {
  /* ─── Options switches ───────────────────────────────── */
}
.import-offcanvas .import-options {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  padding: 12px 14px;
  background: #f9fafb;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  margin-bottom: 18px;
}
.import-offcanvas .import-options .form-check {
  margin-bottom: 0;
}
.import-offcanvas .import-options .form-check-label {
  font-size: 0.88rem;
  cursor: pointer;
}
.import-offcanvas {
  /* ─── Bloc Listes marketing (ChipsPicker) ────────────── */
}
.import-offcanvas .import-marketing-block {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px dashed #e5e7eb;
}
.import-offcanvas .import-marketing-block .import-marketing-label {
  font-size: 0.82rem;
  color: #374151;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 700;
  margin-bottom: 10px;
}
.import-offcanvas .import-marketing-block .import-marketing-label i {
  color: #4f46e5;
  margin-right: 4px;
}
.import-offcanvas .import-marketing-block.is-invalid #importMarketingLists {
  border-radius: 10px;
  box-shadow: 0 0 0 0.15rem rgba(239, 68, 68, 0.12);
}
.import-offcanvas {
  /* ─── Mapping grid ───────────────────────────────────── */
}
.import-offcanvas .import-mapping-section {
  margin-bottom: 18px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 14px 16px;
  transition: opacity 0.2s;
}
.import-offcanvas .import-mapping-section.is-disabled {
  opacity: 0.35;
  pointer-events: none;
}
.import-offcanvas .import-mapping-title {
  font-size: 0.82rem;
  color: #374151;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 12px;
  font-weight: 700;
}
.import-offcanvas .import-mapping-title i {
  color: #4f46e5;
  margin-right: 4px;
}
.import-offcanvas .import-mapping-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 10px 16px;
}
.import-offcanvas .import-mapping-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.import-offcanvas .import-mapping-label {
  flex: 0 0 45%;
  font-size: 0.85rem;
  color: #1f2937;
  font-weight: 500;
}
.import-offcanvas .import-mapping-select {
  flex: 1 1 auto;
  max-width: 55%;
}
.import-offcanvas {
  /* ─── Récap (étape 3) ────────────────────────────────── */
}
.import-offcanvas .import-summary-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}
.import-offcanvas .import-summary-card {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  padding: 10px 12px;
  border-radius: 10px;
}
.import-offcanvas .import-summary-card i {
  font-size: 1.2rem;
  color: #4f46e5;
  background: #eef2ff;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.import-offcanvas .import-summary-label {
  font-size: 0.72rem;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.import-offcanvas .import-summary-val {
  font-size: 0.9rem;
  color: #111827;
  font-weight: 600;
}
.import-offcanvas .import-preview-wrap {
  max-height: 320px;
  overflow: auto;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
}
.import-offcanvas .import-preview-table {
  margin-bottom: 0;
  font-size: 0.82rem;
}
.import-offcanvas .import-preview-table th {
  background: #f3f4f6;
  position: sticky;
  top: 0;
  z-index: 1;
}
.import-offcanvas .import-preview-table .import-preview-h {
  font-weight: 600;
  color: #111827;
}
.import-offcanvas .import-preview-table .import-preview-h-sub {
  font-size: 0.7rem;
  color: #4f46e5;
  font-weight: 500;
}

/* ─── Cellule payload (proTable détails) ─────────────────── */
.import-payload-cell {
  max-width: 380px;
}
.import-payload-cell .badge {
  font-weight: 400;
  white-space: normal;
  text-align: left;
}

/* ─────────────────────────────────────────────────────────────────
   Media Picker — sélecteur d'images type wizard-offcanvas.
   S'appuie sur le composant générique .wizard-offcanvas et n'apporte
   ici que la spécificité "grille de vignettes + dropzone + Unsplash".
   ───────────────────────────────────────────────────────────────── */
.media-picker-offcanvas .media-picker-body {
  padding: 18px 24px;
  overflow-y: auto;
}

/* ─── Toolbar (recherche + actions) ──────────────────────────────── */
.media-picker-toolbar {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
  align-items: center;
}

.media-picker-search {
  flex: 1;
}
.media-picker-search .form-control:focus {
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
  border-color: #818cf8;
}

/* ─── Grille de vignettes ────────────────────────────────────────── */
.media-picker-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
@media (max-width: 1100px) {
  .media-picker-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 700px) {
  .media-picker-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.media-picker-card {
  position: relative;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.media-picker-card:hover {
  border-color: #818cf8;
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(79, 70, 229, 0.12);
}
.media-picker-card .media-picker-card-img {
  aspect-ratio: 4/3;
  background: #f3f4f6;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.media-picker-card .media-picker-card-img img {
  width: 100%;
  height: 100%;
  -o-object-fit: cover;
     object-fit: cover;
  display: block;
}
.media-picker-card .media-picker-card-meta {
  padding: 8px 10px;
  font-size: 12px;
  line-height: 1.3;
}
.media-picker-card .media-picker-card-name {
  font-weight: 600;
  color: #111827;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.media-picker-card .media-picker-card-size {
  color: #6b7280;
  margin-top: 2px;
}
.media-picker-card .media-picker-card-delete {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid #e5e7eb;
  color: #ef4444;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.15s ease;
  cursor: pointer;
  font-size: 14px;
  padding: 0;
}
.media-picker-card .media-picker-card-delete:hover {
  background: #ef4444;
  color: #fff;
  border-color: #ef4444;
}
.media-picker-card:hover .media-picker-card-delete {
  opacity: 1;
}

/* Badge GIF en haut-gauche */
.media-picker-badge {
  position: absolute;
  top: 6px;
  left: 6px;
  z-index: 1;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 3px 6px;
  border-radius: 6px;
  background: #fbbf24;
  color: #78350f;
  text-transform: uppercase;
  line-height: 1;
}

/* Variante Unsplash : pas de meta, juste un crédit en bas */
.media-picker-grid--unsplash .media-picker-card-img {
  aspect-ratio: 3/2;
}
.media-picker-grid--unsplash .media-picker-card-credit {
  padding: 6px 10px;
  font-size: 11px;
  color: #6b7280;
  line-height: 1.35;
  background: #f9fafb;
  border-top: 1px solid #f1f3f5;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.media-picker-grid--unsplash .media-picker-card-credit a {
  color: #4f46e5;
  text-decoration: none;
}
.media-picker-grid--unsplash .media-picker-card-credit a:hover {
  text-decoration: underline;
}
.media-picker-grid--unsplash .media-picker-card-delete {
  display: none;
}

/* ─── État vide / loader / erreur ────────────────────────────────── */
.media-picker-empty {
  text-align: center;
  padding: 40px 20px;
  color: #6b7280;
}
.media-picker-empty i {
  font-size: 36px;
  color: #cbd5e1;
  display: block;
  margin-bottom: 10px;
}
.media-picker-empty p {
  margin-bottom: 14px;
}

.media-picker-loader {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #6b7280;
  font-size: 14px;
  padding: 30px 10px;
}

.media-picker-error {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  margin-top: 12px;
}

/* ─── Pagination Unsplash ────────────────────────────────────────── */
.media-picker-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 14px 0 4px;
  color: #6b7280;
  font-size: 13px;
}
.media-picker-pagination span {
  font-weight: 500;
}

/* ─── Dropzone ───────────────────────────────────────────────────── */
.media-picker-dropzone {
  border: 2px dashed #cbd5e1;
  border-radius: 14px;
  background: #f8fafc;
  padding: 50px 24px;
  text-align: center;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
  cursor: pointer;
  outline: none;
}
.media-picker-dropzone:hover, .media-picker-dropzone:focus, .media-picker-dropzone.is-dragover {
  background: #eef2ff;
  border-color: #818cf8;
}
.media-picker-dropzone.is-dragover {
  transform: scale(1.005);
}
.media-picker-dropzone.is-busy {
  opacity: 0.65;
  pointer-events: none;
}
.media-picker-dropzone .media-picker-dropzone-icon {
  font-size: 42px;
  color: #818cf8;
  margin-bottom: 12px;
}
.media-picker-dropzone .media-picker-dropzone-title {
  font-size: 16px;
  font-weight: 600;
  color: #111827;
  margin-bottom: 4px;
}
.media-picker-dropzone .media-picker-dropzone-sub {
  font-size: 13px;
  color: #6b7280;
  margin-bottom: 12px;
}
.media-picker-dropzone .media-picker-dropzone-hint {
  margin-top: 14px;
  font-size: 12px;
  color: #94a3b8;
}

.media-picker-upload-status {
  margin-top: 14px;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  display: flex;
  align-items: center;
}
.media-picker-upload-status.is-loading {
  background: #f1f5f9;
  color: #475569;
}
.media-picker-upload-status.is-success {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}
.media-picker-upload-status.is-error {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

/* ─── Footer (note d'usage) ──────────────────────────────────────── */
.media-picker-credits {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #6b7280;
  font-size: 12px;
}
.media-picker-credits i {
  color: #818cf8;
}

.private-mode-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  margin-left: 10px;
  padding: 0;
  border: 1px solid transparent;
  background: transparent;
  color: #9ca3af;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
  vertical-align: middle;
}
.private-mode-toggle i {
  font-size: 19px;
  line-height: 1;
}
.private-mode-toggle:hover {
  background: #f3f4f6;
  color: #1f2937;
  border-color: #e5e7eb;
}
.private-mode-toggle:active {
  transform: scale(0.95);
}
.private-mode-toggle.is-active {
  color: #3b82f6;
  background: rgba(59, 130, 246, 0.08);
  border-color: rgba(59, 130, 246, 0.25);
}
.private-mode-toggle.is-active:hover {
  background: rgba(59, 130, 246, 0.14);
  color: #1d4ed8;
}
.private-mode-toggle:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
}

body.is-private-mode .dash-kpi-value,
body.is-private-mode .dash-kpi-sub,
body.is-private-mode .dash-kpi-card__spark {
  filter: blur(7px);
  transition: filter 0.25s ease;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
  pointer-events: none;
}
body.is-private-mode .dash-seller-avatar,
body.is-private-mode .dash-seller-name,
body.is-private-mode .dash-seller-amount,
body.is-private-mode .dash-seller-meta,
body.is-private-mode .dash-seller-bar-fill {
  filter: blur(6px);
  transition: filter 0.25s ease;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
  pointer-events: none;
}
body.is-private-mode .dash-mini-title,
body.is-private-mode .dash-mini-sub,
body.is-private-mode .dash-mini-cell-amount {
  filter: blur(6px);
  transition: filter 0.25s ease;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
  pointer-events: none;
}
body.is-private-mode .dash-recent-avatar,
body.is-private-mode .dash-recent-title,
body.is-private-mode .dash-recent-sub,
body.is-private-mode .dash-recent-meta {
  filter: blur(6px);
  transition: filter 0.25s ease;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
  pointer-events: none;
}
body.is-private-mode .dash-campaign-title,
body.is-private-mode .dash-campaign-sub,
body.is-private-mode .dash-campaign-metric-value,
body.is-private-mode .dash-campaign-rate-head strong {
  filter: blur(6px);
  transition: filter 0.25s ease;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
  pointer-events: none;
}
body.is-private-mode .dash-funnel-meta,
body.is-private-mode .dash-funnel-bar-fill {
  filter: blur(6px);
  transition: filter 0.25s ease;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
  pointer-events: none;
}
body.is-private-mode .dash-trend canvas,
body.is-private-mode .dash-graph__canvas,
body.is-private-mode .dash-widget__body--graph canvas {
  filter: blur(8px);
  transition: filter 0.25s ease;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
  pointer-events: none;
}
body.is-private-mode .dash-recent-item,
body.is-private-mode .dash-mini-link,
body.is-private-mode .dash-campaign-title {
  pointer-events: auto;
}
body.is-private-mode #contactsTablePro .pt-avatar,
body.is-private-mode #contactsTablePro .pt-company-name,
body.is-private-mode #contactsTablePro .pt-cell-sub {
  filter: blur(6px);
  transition: filter 0.25s ease;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
  pointer-events: none;
}
body.is-private-mode #contactsTablePro .pt-td[data-field=email],
body.is-private-mode #contactsTablePro .pt-td[data-field=phone],
body.is-private-mode #contactsTablePro .pt-td[data-field=client_name] {
  filter: blur(6px);
  transition: filter 0.25s ease;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
  pointer-events: none;
}
body.is-private-mode #contactsTablePro a.pt-avatar,
body.is-private-mode #contactsTablePro a.pt-company-name {
  pointer-events: auto;
}
body.is-private-mode #clientsTablePro .pt-avatar,
body.is-private-mode #clientsTablePro .pt-company-name,
body.is-private-mode #clientsTablePro .pt-cell-sub {
  filter: blur(6px);
  transition: filter 0.25s ease;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
  pointer-events: none;
}
body.is-private-mode #clientsTablePro .pt-td[data-field=email],
body.is-private-mode #clientsTablePro .pt-td[data-field=phone] {
  filter: blur(6px);
  transition: filter 0.25s ease;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
  pointer-events: none;
}
body.is-private-mode #clientsTablePro a.pt-avatar,
body.is-private-mode #clientsTablePro a.pt-company-name {
  pointer-events: auto;
}
body.is-private-mode #dealsTablePro .pt-cell-sub,
body.is-private-mode #dealsTablePro .pt-td[data-field=client_name] {
  filter: blur(6px);
  transition: filter 0.25s ease;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
  pointer-events: none;
}

.roles-matrix-root.pro-table-root {
  padding: 0;
  overflow: hidden;
}

.roles-matrix-header {
  padding: 16px 20px;
  border-bottom: 1px solid #e5e7eb;
  background: #ffffff;
}

.roles-matrix-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.roles-matrix-title {
  font-size: 1rem;
  font-weight: 600;
  color: #1f2937;
  margin: 0 0 2px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.roles-matrix-title .ti {
  color: #3b82f6;
  font-size: 1.1em;
}

.roles-matrix-subtitle {
  font-size: 0.85rem;
  color: #9ca3af;
  margin: 0;
}

.roles-matrix-search {
  max-width: 280px;
}

.roles-matrix-error {
  padding: 40px;
  text-align: center;
  color: #b91c1c;
}
.roles-matrix-error .ti {
  font-size: 2rem;
  margin-bottom: 8px;
  display: block;
}

.roles-matrix-body {
  overflow-x: auto;
  max-height: 720px;
  overflow-y: auto;
}

.roles-matrix-table-wrap {
  min-width: 100%;
}

.roles-matrix-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13.5px;
  color: #1f2937;
  background: #ffffff;
}
.roles-matrix-table thead th {
  background: #f9fafb;
  font-weight: 600;
  padding: 0;
  border-bottom: 1px solid #e5e7eb;
}
.roles-matrix-table .rm-th {
  position: relative;
  vertical-align: middle;
  text-align: left;
  padding: 10px 14px;
  border-right: 1px solid #e5e7eb;
}
.roles-matrix-table .rm-th:last-child {
  border-right: none;
}
.roles-matrix-table .rm-th-inner {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 12.5px;
  color: #1f2937;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.roles-matrix-table .rm-th-inner .ti {
  color: #9ca3af;
  font-size: 15px;
}
.roles-matrix-table .rm-th-role {
  width: 180px;
  min-width: 180px;
  padding: 0;
  text-align: center;
  background: #f9fafb;
}
.roles-matrix-table .rm-th-role.is-locked {
  opacity: 0.9;
}
.roles-matrix-table .rm-th-role-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 10px 8px;
  gap: 8px;
}
.roles-matrix-table .rm-role-head {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}
.roles-matrix-table .rm-role-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  flex: 1;
  min-width: 0;
}
.roles-matrix-table .rm-role-name {
  font-weight: 600;
  font-size: 13px;
  color: #1f2937;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.roles-matrix-table .rm-role-count {
  font-size: 11px;
  color: #9ca3af;
  font-weight: 500;
}
.roles-matrix-table .rm-role-menu {
  background: transparent;
  border: 0;
  color: #9ca3af;
  padding: 4px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.roles-matrix-table .rm-role-menu:hover {
  background: rgba(59, 130, 246, 0.08);
  color: #3b82f6;
}
.roles-matrix-table .rm-th-perm {
  background: #ffffff;
  font-weight: 500;
  padding: 10px 14px;
  min-width: 280px;
  max-width: 360px;
}
.roles-matrix-table .rm-module-row {
  background: #f3f4f6;
}
.roles-matrix-table .rm-module-row .rm-th {
  background: #f3f4f6;
  padding: 8px 14px;
}
.roles-matrix-table .rm-module {
  text-align: left;
  font-weight: 600;
}
.roles-matrix-table .rm-module-inner {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #1f2937;
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.roles-matrix-table .rm-module-inner .ti {
  color: #3b82f6;
  font-size: 15px;
}
.roles-matrix-table .rm-module-count {
  margin-left: auto;
  background: #ffffff;
  color: #9ca3af;
  font-size: 10.5px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid #e5e7eb;
  text-transform: none;
  letter-spacing: normal;
}
.roles-matrix-table .rm-perm-row:hover {
  background: #f8fafc;
}
.roles-matrix-table .rm-perm-row:hover .rm-th-perm {
  background: #f8fafc;
}
.roles-matrix-table .rm-perm-inner {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.roles-matrix-table .rm-perm-label {
  font-weight: 500;
  color: #1f2937;
  font-size: 13.5px;
}
.roles-matrix-table .rm-perm-code {
  font-size: 11px;
  color: #9ca3af;
  background: transparent;
  padding: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.roles-matrix-table .rm-td {
  text-align: center;
  vertical-align: middle;
  padding: 8px 10px;
  border-right: 1px solid #e5e7eb;
  border-bottom: 1px solid #e5e7eb;
}
.roles-matrix-table .rm-td:last-child {
  border-right: none;
}
.roles-matrix-table .rm-td-module {
  background: #f3f4f6;
}
.roles-matrix-table .rm-td.is-locked {
  background: rgba(243, 244, 246, 0.5);
}
.roles-matrix-table .rm-sticky-top {
  position: sticky;
  top: 0;
  z-index: 3;
}
.roles-matrix-table .rm-sticky-left {
  position: sticky;
  left: 0;
  z-index: 2;
  background: #ffffff;
}
.roles-matrix-table .rm-module-row .rm-sticky-left {
  z-index: 2;
  background: #f3f4f6;
}
.roles-matrix-table .rm-sticky-top.rm-sticky-left {
  z-index: 4;
}
.roles-matrix-table .rm-empty {
  text-align: center;
  padding: 40px;
  color: #9ca3af;
  font-size: 14px;
}
.roles-matrix-table .rm-empty .ti {
  font-size: 1.5em;
  margin-right: 6px;
  vertical-align: -3px;
}

.rm-check {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  margin: 0;
  padding: 4px;
  border-radius: 6px;
  transition: background 0.15s ease;
}
.rm-check:hover {
  background: rgba(59, 130, 246, 0.06);
}
.rm-check input[type=checkbox] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  margin: 0;
  cursor: pointer;
}
.rm-check input:disabled {
  cursor: not-allowed;
}
.rm-check input:disabled + .rm-check-box {
  opacity: 0.55;
}

.rm-check-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border: 1.5px solid #d1d5db;
  border-radius: 5px;
  background: #ffffff;
  transition: all 0.15s ease;
  position: relative;
}
.rm-check-box::after {
  content: "";
  width: 5px;
  height: 10px;
  border: solid #ffffff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) scale(0);
  transform-origin: center;
  transition: transform 0.15s ease;
  margin-bottom: 2px;
}
.rm-check-box.is-indeterminate::before {
  content: "";
  position: absolute;
  width: 10px;
  height: 2px;
  background: #ffffff;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}
.rm-check-box.is-indeterminate {
  background: #3b82f6;
  border-color: #3b82f6;
}

.rm-check input:checked + .rm-check-box {
  background: #3b82f6;
  border-color: #3b82f6;
}
.rm-check input:checked + .rm-check-box::after {
  transform: rotate(45deg) scale(1);
}
.rm-check input:checked + .rm-check-box::before {
  content: none;
}

.rm-check-all {
  display: flex;
  padding: 6px 0 0;
  width: 100%;
  justify-content: center;
}

.rm-role-popover {
  position: absolute;
  z-index: 1080;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12), 0 4px 6px rgba(0, 0, 0, 0.05);
  min-width: 200px;
  padding: 6px;
  animation: rm-popover-in 0.14s ease;
}

@keyframes rm-popover-in {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.rm-role-popover-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  background: transparent;
  border: 0;
  padding: 9px 10px;
  border-radius: 7px;
  font-size: 13px;
  color: #1f2937;
  text-align: left;
  cursor: pointer;
  transition: background 0.12s ease;
}
.rm-role-popover-item .ti {
  color: #9ca3af;
  font-size: 15px;
}
.rm-role-popover-item:hover:not(:disabled) {
  background: rgba(59, 130, 246, 0.08);
}
.rm-role-popover-item:hover:not(:disabled) .ti {
  color: #3b82f6;
}
.rm-role-popover-item:disabled {
  cursor: not-allowed;
  color: #9ca3af;
}
.rm-role-popover-item.text-danger .ti {
  color: #ef4444;
}
.rm-role-popover-item.text-danger:hover:not(:disabled) {
  background: rgba(239, 68, 68, 0.08);
}

.rm-role-popover-sep {
  height: 1px;
  background: #e5e7eb;
  margin: 4px 0;
}

.rm-role-popover-hint {
  margin-left: auto;
  font-size: 11px;
  color: #9ca3af;
}

.role-swatch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  color: #fff;
  font-size: 16px;
  flex-shrink: 0;
}
.role-swatch.sm {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  font-size: 13px;
}

.role-color-swatch {
  display: inline-block;
  cursor: pointer;
  position: relative;
}
.role-color-swatch input[type=radio] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.role-color-swatch > span {
  display: block;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  border: 2px solid transparent;
  transition: all 0.15s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}
.role-color-swatch input:checked + span {
  border-color: #ffffff;
  outline: 2px solid #3b82f6;
  outline-offset: 1px;
  transform: scale(1.05);
}
.role-color-swatch:hover > span {
  transform: scale(1.08);
}

.pt-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  color: #4b5563;
  background: #f3f4f6;
  padding: 2px 8px;
  border-radius: 6px;
  border: 1px solid #e5e7eb;
}/*# sourceMappingURL=main.css.map */