
      :root {
        font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
          sans-serif;
        color: #111827;
        background: #f3f4f6;
      }
      body {
        margin: 0;
        padding: 0;
        background: radial-gradient(circle at top left, #e0ecff, #f9fafb 45%);
        overflow-x: hidden;
      }
      h1,
      h2,
      h3 {
        margin: 0;
        font-weight: 600;
      }
      .hidden {
        display: none !important;
      }

      /* -------------------- LOGIN SCREEN -------------------- */
      .login-screen {
        position: fixed;
        inset: 0;
        background: radial-gradient(circle at top, #0f172a, #020617 55%);
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        color: #e5e7eb;
        z-index: 1000;
      }
      .login-title {
        font-size: 28px;
        font-weight: 700;
        letter-spacing: 0.12em;
        text-transform: uppercase;
        margin-bottom: 10px;
      }
      .login-sub {
        font-size: 12px;
        color: #9ca3af;
        margin-bottom: 18px;
      }
      .login-card {
        background: rgba(15, 23, 42, 0.96);
        border-radius: 16px;
        padding: 20px 22px;
        width: 320px;
        max-width: 90%;
        box-shadow: 0 18px 50px rgba(0, 0, 0, 0.5);
        border: 1px solid #1f2937;
      }
      .login-label {
        font-size: 11px;
        color: #9ca3af;
        margin-bottom: 4px;
      }
      .login-input {
        width: 100%;
        padding: 8px 10px;
        border-radius: 8px;
        border: 1px solid #374151;
        background: #020617;
        color: #e5e7eb;
        font-size: 12px;
        margin-bottom: 10px;
        box-sizing: border-box;
      }
      .login-input::placeholder {
        color: #6b7280;
      }
      .login-btn {
        width: 100%;
        margin-top: 4px;
        border-radius: 999px;
        border: none;
        padding: 8px 12px;
        font-size: 12px;
        font-weight: 600;
        cursor: pointer;
        letter-spacing: 0.08em;
        text-transform: uppercase;
        background: linear-gradient(135deg, #4f46e5, #7c3aed);
        color: white;
        box-shadow: 0 10px 30px rgba(79, 70, 229, 0.7);
      }
      .login-status {
        margin-top: 10px;
        font-size: 11px;
        color: #9ca3af;
        min-height: 14px;
        text-align: center;
      }
      .login-info {
        margin-top: 10px;
        font-size: 12px;
        color: #cbd5e1;
        text-align: center;
      }
      .login-table {
        margin-top: 12px;
        border-collapse: collapse;
        width: 460px;
        max-width: 95vw;
        font-size: 11px;
        box-shadow: 0 14px 40px rgba(15, 23, 42, 0.9);
      }
      .login-table th,
      .login-table td {
        border: 1px solid #1f2937;
        padding: 4px 6px;
      }
      .login-table th {
        background: #020617;
        color: #9ca3af;
        text-align: left;
      }
      .login-table td {
        background: #020617;
      }

      .sandglass {
        display: inline-block;
        margin-right: 6px;
        animation: spin 1s infinite linear;
      }
      @keyframes spin {
        from {
          transform: rotate(0deg);
        }
        to {
          transform: rotate(180deg);
        }
      }

      /* -------------------- HEADER -------------------- */
      .header-bar {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 16px;
      }
      .header-left {
        display: flex;
        flex-direction: column;
        gap: 6px;
      }
      .user-line {
        display: flex;
        align-items: center;
        gap: 10px;
      }
      .avatar {
        width: 36px;
        height: 36px;
        border-radius: 999px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 14px;
        font-weight: 600;
        background: linear-gradient(135deg, #4f46e5, #7c3aed);
        color: #f9fafb;
        box-shadow: 0 4px 10px rgba(79, 70, 229, 0.4);
      }
      .user-meta {
        display: flex;
        flex-direction: column;
      }
      .user-name {
        font-size: 14px;
        font-weight: 600;
      }
      .user-status {
        font-size: 12px;
        color: #6b7280;
        display: flex;
        align-items: center;
        gap: 6px;
      }
      .status-dot {
        width: 9px;
        height: 9px;
        border-radius: 999px;
        background: #22c55e;
        box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.25);
      }
      .header-title {
        font-size: 22px;
        letter-spacing: 0.04em;
        color: #111827;
        text-transform: uppercase;
      }
      .header-sub {
        font-size: 12px;
        color: #6b7280;
      }

      /* -------------------- STATS BAR + AGENDA -------------------- */
      .stats-top {
        margin: 10px 16px 0 16px;
      }
      .stats-grid {
        display: grid;
        grid-template-columns: 1fr;
        gap: 14px;
      }
      .stat-block {
        background: white;
        border-radius: 12px;
        padding: 12px;
        border: 1px solid #e5e7eb;
        box-shadow: 0 5px 10px rgba(15, 23, 42, 0.06);
        overflow: hidden;
      }
      .stat-title {
        font-size: 12px;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.08em;
        color: #374151;
        margin-bottom: 6px;
      }
      .stat-row {
        display: flex;
        justify-content: space-between;
        font-size: 12px;
        margin-top: 3px;
      }
      .stat-label {
        color: #6b7280;
      }
      .stat-value {
        font-weight: 700;
      }

      /* Agenda */
      .agenda-wrap {
        display: flex;
        flex-direction: column;
        gap: 8px;
      }
      .agenda-days {
        display: grid;
        grid-template-columns: repeat(8, 1fr);
        gap: 8px;
      }
      .agenda-day {
        border: 1px solid #e5e7eb;
        border-radius: 12px;
        padding: 8px;
        background: #f9fafb;
        min-height: 86px;
        display: flex;
        flex-direction: column;
        gap: 6px;
      }
      .agenda-day-head {
        display: flex;
        justify-content: space-between;
        align-items: baseline;
        gap: 6px;
        font-size: 10px;
        color: #6b7280;
        text-transform: uppercase;
        letter-spacing: 0.06em;
      }
      .agenda-date {
        font-weight: 800;
        font-size: 11px;
        color: #111827;
      }
      .agenda-item {
        font-size: 11px;
        padding: 6px 8px;
        border-radius: 10px;
        border: 1px solid #d1d5db;
        background: #fff;
        display: flex;
        align-items: center;
        gap: 6px;
        line-height: 1.2;
      }
      .agenda-item.green {
        background: #dcfce7;
        border-color: #22c55e;
        color: #166534;
      }
      .agenda-item.purple {
        background: #eef2ff;
        border-color: #4f46e5;
        color: #3730a3;
      }
      .agenda-item small {
        color: #6b7280;
      }

      @media (min-width: 980px) {
        .stats-grid {
          grid-template-columns: 340px 1fr;
          align-items: stretch;
        }
      }

      /* -------------------- LAYOUT -------------------- */
      .layout {
        display: grid;
        grid-template-columns: 280px 1.5fr 1.1fr;
        gap: 16px;
        margin: 14px 16px;
      }
      .card {
        background: #ffffff;
        border-radius: 12px;
        box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
        padding: 14px 16px;
        display: flex;
        flex-direction: column;
        border: 1px solid #e5e7eb;
        overflow: hidden;
      }
      .section-title {
        font-size: 13px;
        font-weight: 600;
        text-transform: uppercase;
        color: #6b7280;
        margin-bottom: 8px;
      }

      /* -------------------- LEAD LIST -------------------- */
      .lead-list {
        overflow-y: auto;
        padding-right: 4px;
      }
      .lead-card {
        border-radius: 10px;
        padding: 10px 12px;
        background: #f9fafb;
        margin-bottom: 10px;
        border: 1px solid #e5e7eb;
        cursor: pointer;
        transition: 0.2s;
        position: relative;
      }
      .lead-card:hover {
        background: #eef2ff;
        border-color: #4f46e5;
        transform: translateY(-1px);
      }
      .lead-card.active {
        background: #eef2ff;
        border-color: #4f46e5;
      }
      .lead-card.grayed {
        filter: grayscale(1);
        opacity: 0.5;
      }
      .lead-name {
        font-size: 15px;
        font-weight: 600;
        display: flex;
        align-items: center;
        gap: 8px;
      }
      .lead-meta {
        font-size: 11px;
        color: #6b7280;
        margin-top: 2px;
      }
      .pill {
        display: inline-flex;
        align-items: center;
        padding: 3px 8px;
        font-size: 11px;
        background: #eef2ff;
        border-radius: 999px;
        border: 1px solid #d1d5db;
        margin-top: 4px;
        margin-right: 4px;
      }
      .notif-badge {
        position: absolute;
        top: 10px;
        right: 10px;
        width: 18px;
        height: 18px;
        border-radius: 999px;
        background: #ef4444;
        color: #fff;
        font-size: 11px;
        font-weight: 800;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 6px 16px rgba(239, 68, 68, 0.35);
      }
      .rdv-pill {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        padding: 3px 10px;
        font-size: 11px;
        border-radius: 999px;
        font-weight: 800;
        border: 1px solid transparent;
        margin-top: 6px;
      }
      .rdv-green {
        background: #dcfce7;
        border-color: #22c55e;
        color: #166534;
      }
      .rdv-purple {
        background: #eef2ff;
        border-color: #4f46e5;
        color: #3730a3;
      }

      /* -------------------- QUALIFICATION BADGE -------------------- */
      .qualif-wrapper {
        margin-top: 6px;
      }
      .qualif-label {
        font-size: 11px;
        color: #6b7280;
        margin-bottom: 3px;
      }
      .qualif-pill {
        display: inline-flex;
        align-items: center;
        padding: 3px 10px;
        font-size: 11px;
        border-radius: 999px;
        font-weight: 700;
        border: 1px solid transparent;
      }
      .qualif-chaud {
        background: #dcfce7;
        border-color: #bbf7d0;
        color: #166534;
      }
      .qualif-tiede {
        background: #ffedd5;
        border-color: #fed7aa;
        color: #9a3412;
      }
      .qualif-froid {
        background: #e0f2fe;
        border-color: #bae6fd;
        color: #075985;
      }

      /* -------------------- SCENARIO STEPS -------------------- */
      .step-item {
        display: flex;
        align-items: flex-start;
        gap: 10px;
        margin-bottom: 8px;
      }
      .step-index {
        width: 20px;
        height: 20px;
        border-radius: 999px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 11px;
        font-weight: 600;
        flex-shrink: 0;
      }
      .step-done .step-index {
        background: #bbf7d0;
        color: #166534;
      }
      .step-current .step-index {
        background: #f97316;
        color: white;
      }
      .step-future .step-index {
        background: #16a34a;
        color: white;
      }
      .step-date {
        font-size: 10px;
        color: #6b7280;
        margin-top: 2px;
      }
      .step-done-flag {
        margin-left: 8px;
        font-size: 12px;
        color: #16a34a;
        font-weight: 900;
      }

      /* Barre de progression scénario */
      .scenario-progress {
        margin-top: 6px;
        margin-bottom: 6px;
      }
      .scenario-progress-track {
        width: 100%;
        height: 6px;
        border-radius: 999px;
        background: #e5e7eb;
        overflow: hidden;
      }
      .scenario-progress-fill {
        height: 100%;
        background: linear-gradient(90deg, #4f46e5, #22c55e);
        width: 20%;
        transition: width 0.3s ease;
      }
      .scenario-progress-label {
        font-size: 10px;
        color: #6b7280;
        margin-top: 3px;
      }

      /* -------------------- FLOTTANT APPEL (à gauche) -------------------- */
      .call-floating {
        position: fixed;
        top: 110px;
        left: 16px;
        width: 380px;
        max-width: 90vw;
        background: rgba(15, 23, 42, 0.92);
        border-radius: 16px;
        border: 1px solid #1f2937;
        padding: 14px 16px;
        color: #e5e7eb;
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
        backdrop-filter: blur(4px);
        z-index: 999999;
        animation: fadeIn 0.3s ease-out;
      }
      @keyframes fadeIn {
        from {
          opacity: 0;
          transform: translateY(10px);
        }
        to {
          opacity: 1;
          transform: translateY(0);
        }
      }
      .call-conv {
        max-height: 180px;
        overflow-y: auto;
        padding-right: 6px;
        font-size: 13px;
        line-height: 1.45;
        border-left: 2px solid #4f46e5;
        padding-left: 10px;
        margin-bottom: 8px;
      }
      .call-speaker {
        font-weight: 600;
        color: #a5b4fc;
      }

      /* -------------------- BUTTONS -------------------- */
      .btn {
        border-radius: 999px;
        padding: 6px 12px;
        cursor: pointer;
        border: none;
        font-size: 12px;
        font-weight: 600;
        text-transform: uppercase;
        display: inline-flex;
        align-items: center;
        gap: 6px;
      }
      .btn-primary {
        background: linear-gradient(135deg, #4f46e5, #7c3aed);
        color: white;
      }
      .btn-outline {
        background: #fff;
        border: 1px solid #4f46e5;
        color: #4f46e5;
      }
      .btn-outline:hover {
        background: #eef2ff;
      }
      .btn-calling {
        animation: pulseShadow 1s infinite;
      }
      @keyframes pulseShadow {
        from {
          box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.6);
        }
        to {
          box-shadow: 0 0 0 16px rgba(34, 197, 94, 0);
        }
      }

      .btn-stats {
        padding: 6px 12px;
        border-radius: 999px;
        border: 1px solid #4f46e5;
        background: #fff;
        font-size: 11px;
        font-weight: 600;
        cursor: pointer;
        margin-right: 8px;
        text-transform: uppercase;
        letter-spacing: 0.04em;
        color: #4f46e5;
      }
      .btn-stats:hover {
        background: #eef2ff;
      }

      /* -------------------- MODALS -------------------- */
      .modal-backdrop {
        position: fixed;
        inset: 0;
        background: rgba(15, 23, 42, 0.6);
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 2000;
      }
      .modal-panel {
        background: #ffffff;
        border-radius: 16px;
        box-shadow: 0 20px 50px rgba(15, 23, 42, 0.4);
        padding: 16px 16px 18px;
        max-width: 920px;
        width: 92vw;
        position: relative;
      }
      .modal-title {
        font-size: 17px;
        font-weight: 700;
        margin-bottom: 12px;
      }
      .modal-close {
        position: absolute;
        top: 10px;
        right: 10px;
        padding: 4px 10px;
        border-radius: 999px;
        font-size: 11px;
        border: none;
        background: #e5e7eb;
        color: #111827;
        cursor: pointer;
      }
      .modal-close:hover {
        background: #d1d5db;
      }

      /* Toast */
      .toast {
        position: fixed;
        top: 14px;
        right: 14px;
        background: rgba(15, 23, 42, 0.92);
        color: #e5e7eb;
        border: 1px solid #1f2937;
        padding: 10px 12px;
        border-radius: 12px;
        z-index: 999999;
        box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
        font-size: 12px;
        max-width: 360px;
        backdrop-filter: blur(4px);
        animation: toastIn 0.2s ease-out;
      }
      @keyframes toastIn {
        from {
          opacity: 0;
          transform: translateY(-6px);
        }
        to {
          opacity: 1;
          transform: translateY(0);
        }
      }

      /* MAEVA update modal fields */
      .maeva-form {
        display: grid;
        grid-template-columns: 1.6fr 0.8fr;
        gap: 12px;
        align-items: start;
      }
      .field-label {
        font-size: 11px;
        color: #6b7280;
        margin-bottom: 4px;
      }
      .select,
      .textarea {
        width: 100%;
        box-sizing: border-box;
        border-radius: 10px;
        border: 1px solid #d1d5db;
        padding: 10px;
        font-size: 12px;
        background: #fff;
      }
      .textarea {
        min-height: 170px;
        resize: vertical;
      }

      /* STEP ACTION block */
      .action-block {
        margin-top: 12px;
        border: 1px solid #e5e7eb;
        background: #ffffff;
        border-radius: 12px;
        padding: 12px;
        box-shadow: 0 6px 14px rgba(15, 23, 42, 0.05);
      }

      @media (max-width: 900px) {
        .layout {
          grid-template-columns: 1fr;
        }
        .call-floating {
          top: auto;
          bottom: 16px;
          left: 50%;
          transform: translateX(-50%);
          width: 90vw;
        }
        .maeva-form {
          grid-template-columns: 1fr;
        }
        .agenda-days {
          grid-template-columns: repeat(4, 1fr);
        }
      }

      .admin-row {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  padding:10px;
  border:1px solid #e5e7eb;
  border-radius:12px;
  background:#f9fafb;
  font-size:12px;
}
.admin-row code {
  font-size:11px;
  color:#6b7280;
}
