body {
  font-family: Arial, sans-serif;
  background: #f4f6f9;
  margin: 0;
}

.container {
  max-width: 600px;
  margin: auto;
  padding: 20px;
}

h1 {
  text-align: center;
  font-size: 20px;
}

.card {
  background: #fff;
  padding: 15px;
  border-radius: 10px;
  margin-bottom: 15px;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.05);
}

label {
  font-weight: bold;
  font-size: 14px;
  display: block;
  margin-top: 10px;
}

input,
select,
textarea {
  width: 100%;
  padding: 10px;
  margin-top: 5px;
  border-radius: 8px;
  border: 1px solid #ccc;
}
/* ============================================================
    Le Vendeur | Sell Ops — Global Styles
     ============================================================ */

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  font-family: "Segoe UI", Arial, sans-serif;
  background: #f0f2f5;
  margin: 0;
  color: #1a1a2e;
  font-size: 14px;
}

/* ── Topnav ────────────────────────────────────────────── */
.topnav {
  display: flex;
  align-items: center;
  background: #0a0a23;
  color: #fff;
  padding: 0 20px;
  gap: 20px;
  height: 56px;
  position: sticky;
  top: 0;
  z-index: 100;
}
.topnav-brand {
  font-weight: 800;
  font-size: 15px;
  white-space: nowrap;
  color: #ffe600;
  max-width: 340px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.topnav-links {
  display: flex;
  gap: 4px;
  flex: 1;
  flex-wrap: wrap;
}
.topnav-links a {
  color: #ccc;
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 13px;
  transition:
    background 0.15s,
    color 0.15s;
}
.topnav-links a:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.nav-main-link {
  font-weight: 600;
}

.nav-icon-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  text-align: center;
  width: 34px;
  height: 34px;
  padding: 6px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  position: relative;
}

.nav-live-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
  line-height: 1;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.28);
}

.nav-live-badge.is-hidden {
  display: none;
}

.nav-svg {
  width: 18px;
  height: 18px;
}

.topnav-user {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  white-space: nowrap;
}
.topnav-user a {
  color: #fff;
  text-decoration: none;
}

.topnav-user .nav-icon-link:hover,
.topnav-links .nav-icon-link:hover,
.nav-burger:hover {
  background: rgba(255, 255, 255, 0.12);
}

.nav-burger {
  display: none;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  cursor: pointer;
}

.mobile-drawer {
  display: none;
}

.mobile-drawer-overlay {
  display: none;
}

.nav-option-loader {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 10, 35, 0.14);
  z-index: 400;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
}

.nav-option-loader::after {
  content: "";
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-top-color: #fff;
  border-radius: 50%;
  animation: navSpin 0.7s linear infinite;
}

.nav-option-loader.is-visible {
  opacity: 1;
}

@keyframes navSpin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.mobile-bottom-nav {
  display: none;
}

@media (max-width: 1024px) and (min-width: 641px) and (orientation: portrait) {
  .topnav {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "brand user"
      "links links";
    height: auto;
    padding: 10px 14px;
    gap: 8px;
  }

  .topnav-brand {
    grid-area: brand;
    max-width: none;
  }

  .topnav-user {
    grid-area: user;
    justify-content: flex-end;
    gap: 6px;
  }

  .topnav-links {
    grid-area: links;
    flex-wrap: wrap;
    gap: 6px;
    padding-bottom: 2px;
  }

  .topnav-links a {
    padding: 6px 10px;
    font-size: 12px;
  }

  .main-container {
    padding-top: 18px;
  }
}

@media (max-width: 960px) and (max-height: 520px) and (orientation: landscape) {
  .topnav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 56px;
    padding: 8px 10px;
    gap: 8px;
    position: sticky;
    top: 0;
    z-index: 250;
  }

  .topnav-brand {
    flex: 1;
    max-width: none;
    font-size: 13px;
  }

  .topnav-user {
    justify-content: flex-end;
    gap: 6px;
  }

  .topnav-links {
    display: none;
  }

  .topnav-user .nav-icon-link {
    width: 32px;
    height: 32px;
    min-width: 32px;
    padding: 5px;
  }

  .topnav-user .nav-mobile-drawer-only {
    display: none;
  }

  .main-container {
    padding: 12px 10px 74px;
  }

  .mobile-bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    height: 52px;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    background: #0a0a23;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    z-index: 260;
  }

  .mobile-bottom-nav a,
  .mobile-bottom-nav button {
    appearance: none;
    border: none;
    background: transparent;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .mobile-bottom-nav .is-active {
    background: rgba(255, 255, 255, 0.14);
  }

  .mobile-drawer {
    position: fixed;
    right: 10px;
    bottom: 58px;
    width: min(250px, calc(100vw - 20px));
    max-height: 66vh;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
    padding: 8px;
    z-index: 270;
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
    transition:
      opacity 0.2s ease,
      transform 0.2s ease;
    display: block;
  }

  .mobile-drawer.is-open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }

  .mobile-drawer a {
    display: block;
    padding: 8px 10px;
    border-radius: 8px;
    color: #111827;
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
  }

  .mobile-drawer a.is-active {
    background: #eef2ff;
  }

  .mobile-drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(2, 6, 23, 0.36);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease;
    z-index: 265;
    display: block;
  }

  .mobile-drawer-overlay.is-open {
    opacity: 1;
    pointer-events: auto;
  }

  .drawer-install-btn {
    width: 100%;
    margin-top: 8px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #111827;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    padding: 9px 10px;
  }
}

/* ── Layout ────────────────────────────────────────────── */
.main-container {
  max-width: 1300px;
  margin: 0 auto;
  padding: 24px 20px 60px;
}
.form-max600 {
  max-width: 600px;
}
.form-max700 {
  max-width: 720px;
}

.app-footer {
  text-align: center;
  color: #999;
  font-size: 12px;
  padding: 20px;
  border-top: 1px solid #e5e7eb;
}

/* ── Page header ───────────────────────────────────────── */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  margin-bottom: 24px;
  gap: 12px;
}
.page-header h1 {
  margin: 0;
  font-size: 24px;
}
.page-header p {
  margin: 4px 0 0;
  color: #666;
}
.header-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.header-actions .btn {
  min-height: 36px;
}

/* ── Card ──────────────────────────────────────────────── */
.card {
  background: #fff;
  padding: 20px;
  border-radius: 12px;
  margin-bottom: 16px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}
.card h2 {
  margin: 0 0 14px;
  font-size: 16px;
}
.card-step {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: #555;
  border-bottom: 2px solid #f0f2f5;
  padding-bottom: 8px;
  margin-bottom: 14px;
}
.mt20 {
  margin-top: 20px;
}
.mb20 {
  margin-bottom: 20px;
}

/* ── Typography ────────────────────────────────────────── */
h1,
h2,
h3 {
  font-weight: 700;
}
.text-muted {
  color: #888;
}
.text-green {
  color: #16a34a;
  font-weight: 700;
}

/* ── Alerts ────────────────────────────────────────────── */
.alert {
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 16px;
  font-size: 14px;
}
.alert-success {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #bbf7d0;
}
.alert-error {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
}
.alert-warning {
  background: #fef9c3;
  color: #713f12;
  border: 1px solid #fef08a;
}

/* ── Forms ─────────────────────────────────────────────── */
label {
  font-weight: 600;
  font-size: 13px;
  display: block;
  margin-top: 14px;
  margin-bottom: 4px;
}
label .req {
  color: #e03;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="url"],
input[type="date"],
input[type="time"],
input[type="number"],
input[type="password"],
select,
textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #d1d5db;
  font-size: 14px;
  font-family: inherit;
  background: #fafafa;
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
}
input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: #0a0a23;
  box-shadow: 0 0 0 3px rgba(10, 10, 35, 0.1);
  background: #fff;
}
textarea {
  resize: vertical;
}

input[type="range"] {
  padding: 0;
  background: transparent;
  border: none;
  cursor: pointer;
}
.score-display {
  font-size: 13px;
  margin-top: 4px;
  color: #555;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 520px) {
  .field-row {
    grid-template-columns: 1fr;
  }
}

.mailing-content {
  display: grid;
  gap: 16px;
}

/* ── Buttons ───────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 18px;
  border-radius: 8px;
  border: none;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition:
    opacity 0.15s,
    transform 0.1s;
  white-space: nowrap;
}
.btn:active {
  transform: scale(0.97);
}
.btn-black {
  background: #0a0a23;
  color: #fff;
}
.btn-dark {
  background: #374151;
  color: #fff;
}
.btn-orange {
  background: #f97316;
  color: #fff;
}
.btn-green {
  background: #16a34a;
  color: #fff;
}
.btn-red {
  background: #dc2626;
  color: #fff;
}
.btn-sm {
  padding: 5px 12px;
  font-size: 12px;
}
.btn-lg {
  padding: 13px 24px;
  font-size: 15px;
}
.btn-full {
  width: 100%;
  margin-top: 10px;
}
.btn:hover {
  opacity: 0.85;
}

.settings-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 16px;
  align-items: start;
}

.settings-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.settings-subnav {
  position: sticky;
  top: 76px;
}

.settings-subnav h2 {
  margin-top: 0;
}

.settings-subnav-list {
  display: grid;
  gap: 6px;
}

.settings-subnav-item {
  appearance: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
  text-decoration: none;
  color: #1f2937;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 13px;
  font-weight: 600;
}

.settings-subnav-item.is-active {
  background: #0a0a23;
  color: #fff;
  border-color: #0a0a23;
}

.settings-main {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.settings-shell,
.settings-main,
.settings-panel,
.settings-admin-ajax-content {
  min-width: 0;
}

.settings-admin-ajax-content {
  overflow-x: auto;
}

.settings-admin-ajax-content .main-container {
  max-width: 100%;
  margin: 0;
  padding: 0;
}

.settings-admin-ajax-content .page-header {
  margin-bottom: 14px;
}

.settings-admin-ajax-content .settings-layout {
  grid-template-columns: 1fr;
}

.settings-admin-ajax-content .settings-form-card {
  position: static;
}

.settings-admin-ajax-content .field-row {
  grid-template-columns: 1fr;
}

.settings-admin-ajax-content .table-responsive {
  margin-left: 0;
  margin-right: 0;
  padding: 0;
}

.settings-panel {
  display: none;
}

.settings-panel.is-active {
  display: grid;
  gap: 14px;
}

.settings-panel-head {
  display: flex;
  align-items: center;
  gap: 8px;
}

.settings-panel-head h2 {
  margin: 0;
}

.settings-stack {
  display: grid;
  gap: 16px;
}

.goals-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.goal-column {
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 10px;
}

.goal-column h3 {
  margin: 0 0 8px;
  font-size: 14px;
}

.settings-template-list {
  display: grid;
  gap: 12px;
}

.settings-template-item {
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 12px;
}

.settings-template-item h3 {
  margin: 0 0 6px;
  font-size: 15px;
}

.settings-template-item p {
  margin: 0 0 10px;
  color: #374151;
  white-space: normal;
}

.user-accordion-item {
  padding: 0;
}

.user-accordion-summary {
  list-style: none;
  cursor: pointer;
  padding: 12px;
  display: grid;
  gap: 4px;
}

.user-accordion-summary::-webkit-details-marker {
  display: none;
}

.user-accordion-name {
  font-size: 14px;
  font-weight: 700;
  color: #111827;
}

.user-accordion-meta {
  font-size: 12px;
  color: #6b7280;
}

.user-accordion-body {
  border-top: 1px solid #e5e7eb;
  padding: 12px;
}

.user-section {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.user-section h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 14px;
}

.user-status-badge {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  margin-left: 6px;
}

.user-status-badge.is-active {
  background: #dcfce7;
  color: #166534;
}

.user-status-badge.is-inactive {
  background: #e5e7eb;
  color: #4b5563;
}

.user-accordion-item.is-inactive {
  background: #f3f4f6;
  border-color: #d1d5db;
}

.user-accordion-item.is-inactive .user-accordion-summary,
.user-accordion-item.is-inactive .user-accordion-body {
  background: #f3f4f6;
}

.user-accordion-item.is-inactive .user-accordion-name {
  color: #4b5563;
}

.inline-form {
  display: grid;
  gap: 8px;
  margin-left: 0;
  max-width: 360px;
}

.inline-form .checkbox-inline {
  margin-top: 0;
}

.inline-form .btn,
.inline-form select {
  width: 100%;
}

.checkbox-inline {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  font-weight: 600;
}

.checkbox-inline input[type="checkbox"] {
  width: auto;
  margin-top: 0;
}

.template-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 10px;
}

.settings-groups {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.settings-form-card {
  position: sticky;
  top: 76px;
}

.settings-stack .settings-form-card {
  position: static;
}

.settings-stack .settings-form-card:first-child {
  position: sticky;
  top: 76px;
}

.settings-group-card h2 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.settings-shortcuts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-start;
}

.compact-card {
  padding: 12px 16px;
}

.session-hint {
  margin-top: 12px;
  font-size: 12px;
}

.field-row-3 {
  grid-template-columns: repeat(3, 1fr);
}

.field-row-4 {
  grid-template-columns: repeat(4, 1fr);
}

.template-help {
  margin-top: 8px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #f9fafb;
}

.template-help summary {
  list-style: none;
  cursor: pointer;
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 700;
  color: #1f2937;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.template-help summary::-webkit-details-marker {
  display: none;
}

.template-help-icon {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  background: #0a0a23;
  color: #fff;
}

.template-help-body {
  padding: 0 10px 10px;
  font-size: 12px;
  color: #4b5563;
}

.template-help-body code {
  background: #eef2ff;
  border-radius: 6px;
  padding: 1px 6px;
  color: #3730a3;
  font-size: 11px;
}

@media (max-width: 900px) {
  .field-row-3,
  .field-row-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .field-row-3,
  .field-row-4 {
    grid-template-columns: 1fr;
  }
}

.gps-inline {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 6px;
}

.top-gap {
  margin-top: 14px;
}

.btn-call-big.is-disabled {
  pointer-events: none;
  opacity: 0.45;
}

/* ── Call button ───────────────────────────────────────── */
.tel-group {
  display: flex;
  gap: 8px;
  align-items: center;
}
.tel-group input {
  flex: 1;
}
.btn-call-big {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #16a34a;
  color: #fff;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  border: none;
  white-space: nowrap;
}
.btn-call-big:disabled {
  background: #9ca3af;
  cursor: not-allowed;
}
.btn-call {
  color: #15803d;
  font-weight: 600;
  text-decoration: none;
}
.btn-call:hover {
  text-decoration: underline;
}
.btn-call-sm {
  background: #16a34a;
  color: #fff;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 16px;
  text-decoration: none;
}

/* ── Radio cards ───────────────────────────────────────── */
.radio-card-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}
.radio-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 10px;
  border: 2px solid #e5e7eb;
  cursor: pointer;
  font-size: 13px;
  text-align: center;
  min-width: 90px;
  transition:
    border-color 0.15s,
    background 0.15s;
  user-select: none;
}
.radio-card input[type="radio"] {
  display: none;
}
.radio-card:has(input:checked) {
  border-color: #0a0a23;
  background: #f1f5f9;
}
.rc-green:has(input:checked) {
  border-color: #16a34a;
  background: #dcfce7;
}
.rc-orange:has(input:checked) {
  border-color: #ea580c;
  background: #ffedd5;
}
.rc-blue:has(input:checked) {
  border-color: #2563eb;
  background: #dbeafe;
}
.rc-red:has(input:checked) {
  border-color: #dc2626;
  background: #fee2e2;
}
.rc-grey:has(input:checked) {
  border-color: #9ca3af;
  background: #f3f4f6;
}
.rc-dark:has(input:checked) {
  border-color: #0a0a23;
  background: #e0e7ff;
}
.rc-selected {
  border-color: #0a0a23;
  background: #e0e7ff;
}

/* ── Radio pills ───────────────────────────────────────── */
.radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}
.radio-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 20px;
  border: 2px solid #e5e7eb;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  transition:
    border-color 0.15s,
    background 0.15s;
  user-select: none;
}
.radio-pill input {
  display: none;
}
.radio-pill:has(input:checked) {
  border-color: #0a0a23;
  background: #0a0a23;
  color: #fff;
}

/* ── Checkbox pills ────────────────────────────────────── */
.checkbox-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}
.checkbox-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 20px;
  border: 2px solid #e5e7eb;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  transition:
    border-color 0.15s,
    background 0.15s;
  user-select: none;
}
.checkbox-pill input {
  display: none;
}
.checkbox-pill:has(input:checked) {
  border-color: #dc2626;
  background: #fee2e2;
  color: #991b1b;
}

/* ── Social rows ───────────────────────────────────────── */
.social-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.social-icon {
  width: 110px;
  font-weight: 600;
  font-size: 13px;
  flex-shrink: 0;
}
.social-row input {
  flex: 1;
}
.social-link {
  display: inline-block;
  padding: 6px 12px;
  background: #f3f4f6;
  border-radius: 8px;
  text-decoration: none;
  color: #1a1a2e;
  font-size: 13px;
  margin: 3px 3px 3px 0;
}

/* ── KPI Grid ──────────────────────────────────────────── */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}
.kpi-sm .kpi-card {
  padding: 12px;
}
.kpi-card {
  background: #fff;
  border-radius: 12px;
  padding: 18px 16px;
  text-align: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
  border-top: 4px solid #e5e7eb;
}
.kpi-blue {
  border-top-color: #3b82f6;
}
.kpi-orange {
  border-top-color: #f97316;
}
.kpi-green {
  border-top-color: #22c55e;
}
.kpi-purple {
  border-top-color: #a855f7;
}
.kpi-teal {
  border-top-color: #14b8a6;
}
.kpi-red {
  border-top-color: #ef4444;
}
.kpi-yellow {
  border-top-color: #eab308;
}
.kpi-black {
  border-top-color: #0a0a23;
}
.kpi-num {
  font-size: 32px;
  font-weight: 800;
  line-height: 1;
}
.kpi-label {
  font-size: 12px;
  color: #666;
  margin-top: 6px;
}

/* ── Quick actions ─────────────────────────────────────── */
.quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}

.goal-board {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.goal-period-card {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 12px;
  background: #fbfdff;
}

.goal-period-card h3 {
  margin: 0 0 10px;
  font-size: 15px;
}

.goal-lines {
  display: grid;
  gap: 10px;
}

.goal-line-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
}

.goal-progress {
  height: 8px;
  border-radius: 999px;
  background: #e5e7eb;
  overflow: hidden;
}

.goal-progress-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #2563eb, #0ea5e9);
}

.goal-status {
  font-size: 11px;
  color: #6b7280;
}

.goal-status.goal-ok {
  color: #166534;
  font-weight: 700;
}

/* ── Badges ────────────────────────────────────────────── */
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 20px;
  background: #e5e7eb;
  font-size: 12px;
  font-weight: 600;
}
.badge-red {
  background: #fee2e2;
  color: #991b1b;
}
.badge-orange {
  background: #ffedd5;
  color: #9a3412;
}
.badge-green {
  background: #dcfce7;
  color: #166534;
}
.badge-grey {
  background: #f3f4f6;
  color: #6b7280;
}

/* ── Interet badges ────────────────────────────────────── */
.interet-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  background: #f3f4f6;
  color: #1a1a2e;
}
.interet-sm {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 10px;
  background: #f3f4f6;
}

/* ── Pipeline badges ───────────────────────────────────── */
.pipeline-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
  background: #e0e7ff;
  color: #3730a3;
  margin-left: 4px;
}

/* ── Prospect list (session view) ──────────────────────── */
.prospect-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.prospect-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  background: #fafafa;
  transition: background 0.12s;
}
.prospect-row:hover {
  background: #f0f2f5;
}
.prospect-main {
  flex: 1;
  min-width: 200px;
  font-size: 14px;
}
.prospect-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.prospect-actions {
  display: flex;
  gap: 6px;
}

.bulk-checkbox {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
}

.bulk-checkbox input[type="checkbox"] {
  width: 16px;
  height: 16px;
}

/* ── Detail grid ───────────────────────────────────────── */
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 700px) {
  .detail-grid {
    grid-template-columns: 1fr;
  }
}

/* ── Info table ────────────────────────────────────────── */
.info-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.info-table th,
.info-table td {
  padding: 8px 6px;
  text-align: left;
  border-bottom: 1px solid #f0f2f5;
}
.info-table th {
  width: 130px;
  color: #666;
  font-weight: 600;
}

/* ── Pipeline visual (prospect detail) ─────────────────── */
.pipeline-visual {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.pipeline-step {
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 13px;
  background: #f3f4f6;
  color: #9ca3af;
}
.pipeline-step.done {
  background: #e0e7ff;
  color: #4338ca;
}
.pipeline-step.current {
  background: #0a0a23;
  color: #fff;
  font-weight: 700;
}

/* ── Pipeline kanban board ─────────────────────────────── */
.pipeline-board {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 12px;
  align-items: flex-start;
}
.pipeline-col {
  min-width: 200px;
  max-width: 220px;
  flex-shrink: 0;
  background: #f8fafc;
  border-radius: 12px;
  padding: 12px;
}
.pipeline-col-header {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.pipeline-empty {
  font-size: 12px;
  color: #bbb;
  text-align: center;
  padding: 10px 0;
}
.pipeline-card {
  display: block;
  background: #fff;
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 8px;
  border: 1px solid #e5e7eb;
  text-decoration: none;
  color: #1a1a2e;
  transition:
    box-shadow 0.15s,
    transform 0.1s;
}
.pipeline-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transform: translateY(-1px);
}
.pc-name {
  font-weight: 700;
  font-size: 13px;
}
.pc-meta {
  font-size: 12px;
  color: #666;
  margin-top: 3px;
}
.pc-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 11px;
}
.relance-date {
  color: #f97316;
}
.score-sm {
  font-weight: 700;
}

/* ── Relances ───────────────────────────────────────────── */
.relance-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 10px;
  border-left: 4px solid #e5e7eb;
  background: #fafafa;
  margin-bottom: 8px;
  transition:
    transform 0.16s ease,
    box-shadow 0.16s ease;
}
.relance-row:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
}
.relance-today {
  border-left-color: #f97316;
  background: #fff7ed;
}
.relance-overdue {
  border-left-color: #dc2626;
  background: #fef2f2;
}
.relance-time {
  font-weight: 700;
  font-size: 13px;
  width: 80px;
  flex-shrink: 0;
  color: #555;
}
.relance-main {
  flex: 1;
  min-width: 180px;
}
.relance-main a {
  color: #1a1a2e;
  font-weight: 600;
}
.relance-meta {
  display: flex;
  gap: 6px;
  align-items: center;
}
.relance-actions {
  display: flex;
  gap: 6px;
}

.relance-create-form {
  display: grid;
  gap: 8px;
}

.relance-create-form .btn {
  justify-self: flex-start;
}
.type-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  background: #e0e7ff;
  color: #3730a3;
  font-size: 11px;
  font-weight: 600;
}
.pipeline-sm {
  font-size: 11px;
  padding: 2px 7px;
  background: #f3f4f6;
  border-radius: 8px;
}

/* ── Stats table ───────────────────────────────────────── */
.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.stats-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.stats-table th,
.stats-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid #f0f2f5;
  white-space: nowrap;
}
.stats-table th {
  background: #f8fafc;
  font-weight: 700;
  color: #555;
}
.stats-table tbody tr:hover {
  background: #f8fafc;
}

.stats-table-stack-mobile td {
  white-space: normal;
}

.stats-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 700px) {
  .stats-split {
    grid-template-columns: 1fr;
  }
}

/* ── Funnel ─────────────────────────────────────────────── */
.funnel {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 0;
}
.funnel-step {
  background: #3b82f6;
  color: #fff;
  padding: 10px 14px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 14px;
  width: var(--w, 100%);
  max-width: 100%;
  min-width: 14%;
  transition: width 0.4s ease;
  overflow-wrap: anywhere;
}
.funnel-vente {
  background: #16a34a;
}
.funnel-zero {
  background: #94a3b8;
}

.card-head-inline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.card-head-inline h2 {
  margin: 0;
}

.notif-list {
  display: grid;
  gap: 8px;
}

.notif-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  background: #f8fafc;
}

.notif-item strong {
  font-size: 13px;
}

.notif-item span {
  font-size: 12px;
  color: #4b5563;
}

.notif-feed {
  display: grid;
  gap: 12px;
}

.notif-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 14px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  transition:
    transform 0.16s ease,
    box-shadow 0.16s ease;
}
.notif-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

.card,
.kpi-card,
.btn,
.topnav-links a,
.topnav-user .nav-icon-link,
.mobile-bottom-nav a,
.mobile-bottom-nav button {
  transition:
    transform 0.16s ease,
    box-shadow 0.16s ease,
    background 0.16s ease,
    opacity 0.16s ease;
}

.card:hover,
.kpi-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}

.btn:active,
.topnav-user .nav-icon-link:active,
.mobile-bottom-nav a:active,
.mobile-bottom-nav button:active {
  transform: scale(0.97);
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}

.notif-card-unread {
  border-color: #c7d2fe;
  background: #f8faff;
}

.notif-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.notif-card-head strong {
  display: block;
}

.notif-card-head time {
  font-size: 12px;
  color: #6b7280;
  white-space: nowrap;
}

.notif-type {
  display: inline-block;
  margin-top: 4px;
  font-size: 11px;
  color: #374151;
  background: #eef2ff;
  border-radius: 999px;
  padding: 2px 8px;
}

.notif-card p {
  margin: 10px 0;
  color: #374151;
}

.notif-card-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.messages-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 16px;
}

.messages-sidebar h2,
.messages-main h2 {
  margin-top: 0;
}

.thread-list {
  display: grid;
  gap: 8px;
}

.thread-item {
  display: block;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 10px 12px;
  text-decoration: none;
  color: inherit;
  background: #fafafa;
}

.thread-item-active {
  border-color: #a5b4fc;
  background: #eef2ff;
}

.thread-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.thread-bottom {
  margin-top: 5px;
  color: #4b5563;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.messages-thread {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 420px;
  overflow-y: auto;
  padding-right: 6px;
  margin-bottom: 14px;
}

.msg-bubble {
  max-width: 85%;
  border-radius: 12px;
  padding: 10px 12px;
  border: 1px solid #e5e7eb;
}

.msg-bubble-me {
  margin-left: auto;
  background: #0a0a23;
  border-color: #0a0a23;
  color: #fff;
}

.msg-bubble-them {
  margin-right: auto;
  background: #f8fafc;
}

.msg-author {
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 4px;
  opacity: 0.85;
}

.msg-text {
  font-size: 13px;
}

.msg-time {
  margin-top: 6px;
  font-size: 11px;
  opacity: 0.75;
  text-align: right;
}

.messages-form {
  display: grid;
  gap: 8px;
}

.contact-block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
}

.contacts-wrap {
  display: grid;
  gap: 10px;
}

.contact-item {
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 10px;
  background: #f9fafb;
}

.contact-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.contact-title {
  margin: 0 0 8px;
  font-size: 13px;
  color: #374151;
}

@media (max-width: 900px) {
  .settings-shell {
    grid-template-columns: 1fr;
  }

  .settings-subnav {
    position: static;
  }

  .settings-subnav-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    overflow: visible;
    padding-bottom: 0;
  }

  .settings-subnav-item {
    flex: 1 1 calc(50% - 8px);
    min-width: 0;
    white-space: normal;
    min-height: 44px;
  }

  .settings-main {
    overflow-x: hidden;
  }

  .settings-main .card {
    min-width: 0;
  }

  .settings-layout {
    grid-template-columns: 1fr;
  }

  .settings-form-card {
    position: static;
  }

  .goals-grid,
  .goal-board {
    grid-template-columns: 1fr;
  }

  .messages-layout {
    grid-template-columns: 1fr;
  }

  .messages-thread {
    max-height: 340px;
  }

  .header-actions {
    width: 100%;
  }

  .header-actions .btn {
    flex: 1 1 100%;
  }
}

@media (max-width: 520px) {
  .settings-subnav-list {
    display: flex;
    flex-wrap: wrap;
  }

  .settings-subnav-item {
    flex-basis: 100%;
  }

  .inline-form {
    max-width: 100%;
  }
}

/* ── Problèmes bars ─────────────────────────────────────── */
.prob-bars {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.prob-bar-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.prob-label {
  width: 230px;
  font-size: 13px;
  flex-shrink: 0;
}
.prob-bar-wrap {
  flex: 1;
  background: #f0f2f5;
  border-radius: 6px;
  height: 18px;
  overflow: hidden;
}
.prob-bar {
  height: 100%;
  background: #f97316;
  border-radius: 6px;
}
.prob-count {
  width: 30px;
  font-weight: 700;
  font-size: 13px;
  text-align: right;
}

/* ── Pipeline bar chart ─────────────────────────────────── */
.pipeline-bar-chart {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.pbar-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.pbar-label {
  width: 200px;
  font-size: 13px;
  flex-shrink: 0;
}
.pbar-wrap {
  flex: 1;
  background: #f0f2f5;
  border-radius: 6px;
  height: 22px;
  overflow: hidden;
}
.pbar-fill {
  height: 100%;
  background: #0a0a23;
  border-radius: 6px;
}
.pbar-count {
  width: 30px;
  font-weight: 700;
  font-size: 13px;
  text-align: right;
}

/* ── Tag list ───────────────────────────────────────────── */
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.tag {
  padding: 4px 10px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
  background: #f3f4f6;
}
.tag-red {
  background: #fee2e2;
  color: #991b1b;
}

/* ── Login page ─────────────────────────────────────────── */
.login-body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: #0a0a23;
}
.login-box {
  background: #fff;
  padding: 40px;
  border-radius: 16px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}
.login-box h1 {
  text-align: center;
  font-size: 28px;
  margin-bottom: 6px;
}
.login-sub {
  text-align: center;
  color: #666;
  margin-bottom: 24px;
}

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 640px) {
  .topnav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 56px;
    padding: 10px;
    gap: 8px;
    position: sticky;
    top: 0;
    z-index: 250;
  }

  .topnav-brand {
    flex: 1;
    max-width: none;
    font-size: 14px;
  }

  .topnav-user {
    text-align: left;
    font-size: 12px;
    justify-content: flex-end;
    gap: 6px;
  }

  .topnav-links {
    display: none;
  }

  .topnav-user .nav-icon-link {
    width: 32px;
    height: 32px;
    min-width: 32px;
    padding: 5px;
  }

  .topnav-user .nav-icon-link[href*="messages"],
  .topnav-user .nav-icon-link[href*="notifications"] {
    display: inline-flex;
  }

  .topnav-user .nav-mobile-drawer-only {
    display: none;
  }

  .nav-burger {
    display: none;
  }

  .main-container {
    padding: 14px 10px 82px;
  }

  .page-header h1 {
    font-size: 20px;
  }

  .card {
    padding: 14px;
    border-radius: 10px;
  }

  .card h2 {
    font-size: 15px;
  }

  .table-responsive {
    margin-left: -4px;
    margin-right: -4px;
    padding: 0 4px;
    border-radius: 8px;
  }

  .stats-table,
  .info-table {
    min-width: 560px;
  }

  .stats-table-stack-mobile {
    min-width: 100%;
    border-collapse: separate;
    border-spacing: 0;
  }

  .stats-table-stack-mobile thead {
    display: none;
  }

  .stats-table-stack-mobile tbody {
    display: grid;
    gap: 10px;
  }

  .stats-table-stack-mobile tbody tr {
    display: block;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 8px 10px;
    background: #fff;
  }

  .stats-table-stack-mobile td {
    display: grid;
    grid-template-columns: 112px 1fr;
    gap: 8px;
    padding: 6px 0;
    border-bottom: 1px solid #f3f4f6;
    white-space: normal;
    font-size: 12px;
  }

  .stats-table-stack-mobile td:last-child {
    border-bottom: none;
  }

  .stats-table-stack-mobile td::before {
    content: attr(data-label);
    font-weight: 700;
    color: #4b5563;
  }

  .mobile-bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    height: 58px;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0;
    background: #0a0a23;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    z-index: 260;
  }

  .mobile-bottom-nav a,
  .mobile-bottom-nav button {
    appearance: none;
    border: none;
    background: transparent;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .mobile-bottom-nav .is-active {
    background: rgba(255, 255, 255, 0.14);
  }

  .mobile-bottom-nav button .nav-svg {
    width: 18px;
    height: 18px;
  }

  .mobile-bottom-nav button {
    cursor: pointer;
  }

  .mobile-bottom-nav button:active {
    background: rgba(255, 255, 255, 0.14);
  }

  .mobile-drawer {
    position: fixed;
    right: 10px;
    bottom: 66px;
    width: min(260px, calc(100vw - 20px));
    max-height: 70vh;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
    padding: 8px;
    z-index: 270;
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
    transition:
      opacity 0.2s ease,
      transform 0.2s ease;
  }

  .mobile-drawer a {
    display: block;
    padding: 10px 12px;
    border-radius: 8px;
    color: #111827;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
  }

  .mobile-drawer a.is-active {
    background: #eef2ff;
    color: #111827;
  }

  .drawer-install-btn {
    width: 100%;
    margin-top: 8px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #111827;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    padding: 10px 12px;
    cursor: pointer;
  }

  .mobile-drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(2, 6, 23, 0.36);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease;
    z-index: 265;
    display: block;
  }

  .mobile-drawer-overlay.is-open {
    opacity: 1;
    pointer-events: auto;
  }

  .mobile-drawer a:hover {
    background: #f3f4f6;
  }

  .mobile-drawer:not(.is-open) {
    display: block;
  }

  .mobile-drawer.is-open {
    display: block;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }

  .stats-table th,
  .stats-table td {
    padding: 8px 10px;
    font-size: 12px;
  }

  .info-table th,
  .info-table td {
    padding: 7px 8px;
    font-size: 12px;
  }

  .btn,
  .btn-sm,
  .btn-lg {
    min-height: 38px;
  }

  .settings-layout,
  .settings-stack,
  .settings-groups {
    gap: 12px;
  }

  .settings-shortcuts .btn {
    flex: 1 1 100%;
  }

  .pipeline-board {
    gap: 8px;
  }
  .pipeline-col {
    min-width: 160px;
  }
  .quick-actions {
    flex-direction: column;
  }
  .prob-label {
    width: 150px;
  }
  .pbar-label {
    width: 140px;
  }
}
