/* Modernisation visuelle du tableau — aucune modification fonctionnelle */
.app-topbar .brand .logo{
  display:block;
  width:34px;
  height:34px;
  border-radius:9px;
  object-fit:contain;
  background:transparent;
  box-shadow:none;
}
#tableView .toolbar{
  position:relative;
  z-index:3;
  min-height:68px;
  padding:14px 16px;
  border:1px solid #e5ebe8;
  border-radius:16px 16px 0 0;
  background:linear-gradient(180deg,#fff 0%,#fcfdfd 100%);
}
#tableView .search{height:40px;border-radius:11px;background:#f7f9f8;border-color:#e6ebe9;transition:.18s ease}
#tableView .search:hover{background:#fff;border-color:#d7e0dc}
#tableView .filters{align-items:center;gap:8px}
#tableView .filters select,#tableView .filters button{height:40px;border-radius:10px;border-color:#e1e7e4;transition:.18s ease}
#tableView .filters select:hover,#tableView .filters button:hover{border-color:#cbd7d2;background:#f8fbfa}

#tableView .sheet-card{
  border:1px solid #e5ebe8;
  border-top:0;
  border-radius:0 0 16px 16px;
  box-shadow:0 16px 45px rgba(22,47,37,.07);
}
#tableView .table-scroller{background:#fff}
#crmTable{border-collapse:separate;border-spacing:0}
#crmTable th,#crmTable td{border-right:0;border-bottom:1px solid #edf1ef}

#crmTable .group-row th{
  height:30px;
  font:700 8px/1 Manrope,sans-serif;
  letter-spacing:1.15px;
  border-right:1px solid rgba(7,108,76,.08);
}
#crmTable .group.manager,#crmTable .group.assignment,#crmTable .group.contact,#crmTable .group.setting{
  background:#e7f8f1!important;
  color:#087b59!important;
  border-color:#d9eee6!important;
}
#crmTable .group.assignment{background:#dcf5eb!important}
#crmTable .group-row .row-number{background:#f0f5f3!important;border-color:#e4ebe8!important}

#crmTable .column-row th,#crmTable .column-row th.setting-header{
  height:50px;
  padding:9px 10px;
  background:#f8faf9!important;
  color:#5c6863!important;
  border-bottom:1px solid #dfe7e3!important;
  font-size:8px;
  font-weight:700;
  letter-spacing:.55px;
  text-align:center;
}
#crmTable .column-row th.row-number{background:#f3f6f5!important;color:#9aa49f!important}
#crmTable .column-row .sticky-a,#crmTable .column-row .sticky-b,#crmTable .column-row .sticky-c{background:#f4f8f6!important}

#crmTable tbody td{height:58px;padding:8px 9px;transition:background-color .16s ease,box-shadow .16s ease}
#crmTable tbody tr:last-child td{border-bottom:0}
#crmTable tbody tr:hover td{filter:none!important;box-shadow:inset 0 1px rgba(14,170,120,.07),inset 0 -1px rgba(14,170,120,.07)}
#crmTable tbody tr:hover td:first-child{box-shadow:inset 3px 0 var(--brand),inset 0 1px rgba(14,170,120,.07),inset 0 -1px rgba(14,170,120,.07)}
#crmTable tbody .row-number{font-size:9px;font-weight:600;color:#a1aaa6!important}
#crmTable tbody .sticky-c{box-shadow:10px 0 18px -16px rgba(20,45,35,.8)!important}

#crmTable td input,#crmTable td select,#crmTable td textarea{
  height:38px;
  padding:7px 9px;
  border:1px solid transparent;
  border-radius:9px;
  background:transparent;
  color:#26322d;
  font-size:10px;
  font-weight:500;
  transition:background-color .16s ease,border-color .16s ease,box-shadow .16s ease;
}
#crmTable td input:hover,#crmTable td select:hover,#crmTable td textarea:hover{background:rgba(255,255,255,.72);border-color:#dce5e1}
#crmTable td input:focus,#crmTable td select:focus,#crmTable td textarea:focus{background:#fff;border-color:#53bf99;box-shadow:0 0 0 3px rgba(14,170,120,.11)}
#crmTable td.c-company input{font-weight:700;color:#18221e}
#crmTable td.c-name input{font-weight:600}

/* Alignement uniforme de toutes les colonnes et de leur contenu. */
#crmTable thead th,#crmTable tbody td{text-align:center}
#crmTable td input,#crmTable td select,#crmTable td textarea{text-align:center;text-align-last:center}
#crmTable td select{padding-left:24px}
#crmTable .activity-button{justify-content:center}

/* Dates d'appel compactes : valeur et calendrier forment un seul bloc centré. */
#crmTable th.c-call{text-align:center}
#crmTable td.c-call{padding-left:8px;padding-right:8px;text-align:center}
#crmTable td.c-call input[type="date"]{
  width:118px;
  min-width:0;
  max-width:118px;
  height:34px;
  margin:0 auto;
  position:relative;
  left:-4px;
  padding:5px 7px 5px 9px;
  text-align:center;
  color:#34413b;
  font-variant-numeric:tabular-nums;
}
#crmTable td.c-call input[type="date"]::-webkit-calendar-picker-indicator{
  width:15px;
  height:15px;
  margin:0 0 0 4px;
  padding:0;
  cursor:pointer;
  opacity:.62;
}

/* Réponse : case carrée, parfaitement centrée et verte une fois cochée. */
#crmTable th.c-check{text-align:center}
#crmTable td.check-cell{text-align:center;padding-left:0;padding-right:0}
#crmTable td.check-cell input[type="checkbox"]{
  appearance:none;
  -webkit-appearance:none;
  display:grid;
  place-items:center;
  width:20px;
  min-width:20px;
  max-width:20px;
  height:20px;
  margin:0 auto;
  padding:0;
  border:1.5px solid #bfcac5;
  border-radius:5px;
  background:#fff;
  box-shadow:none;
  cursor:pointer;
}
#crmTable td.check-cell input[type="checkbox"]:hover{border-color:#65bb9b;background:#f5fcf9}
#crmTable td.check-cell input[type="checkbox"]:checked{
  border-color:var(--brand);
  background:var(--brand);
  box-shadow:0 3px 9px rgba(14,170,120,.22);
}
#crmTable td.check-cell input[type="checkbox"]:checked::after{
  content:'✓';
  color:#fff;
  font-size:13px;
  font-weight:800;
  line-height:1;
}
#crmTable td.check-cell input[type="checkbox"]:focus-visible{outline:0;box-shadow:0 0 0 3px rgba(14,170,120,.16)}

/* Le statut se lit comme un badge, tout en restant directement éditable. */
#crmTable td.c-status select{height:32px;border:0;border-radius:999px;padding:5px 25px 5px 10px;font-weight:700;font-size:9px}
#crmTable tr.row-waiting td.c-status select{background:#f0f3f2;color:#65706b}
#crmTable tr.row-followup td.c-status select{background:#ffe0b5;color:#98560a}
#crmTable tr.row-nurturing td.c-status select{background:#ffd5d9;color:#a3323c}
#crmTable tr.row-rdv td.c-status select{background:#cceedd;color:#08764f}

/* La teinte du statut couvre réellement toute la ligne, sans pavés neutres. */
#crmTable tr.row-followup td input,#crmTable tr.row-followup td textarea,#crmTable tr.row-followup td select:not([data-key="status"]),
#crmTable tr.row-nurturing td input,#crmTable tr.row-nurturing td textarea,#crmTable tr.row-nurturing td select:not([data-key="status"]),
#crmTable tr.row-rdv td input,#crmTable tr.row-rdv td textarea,#crmTable tr.row-rdv td select:not([data-key="status"]){background:transparent!important}
#crmTable tr.row-followup .activity-button,#crmTable tr.row-nurturing .activity-button,#crmTable tr.row-rdv .activity-button{background:transparent!important;box-shadow:inset 0 0 0 1px rgba(45,78,65,.14)}
#crmTable tr.row-followup td.check-cell input[type="checkbox"],#crmTable tr.row-nurturing td.check-cell input[type="checkbox"],#crmTable tr.row-rdv td.check-cell input[type="checkbox"]{background:rgba(255,255,255,.5)!important}
#crmTable tr.row-followup td.check-cell input[type="checkbox"]:checked,#crmTable tr.row-nurturing td.check-cell input[type="checkbox"]:checked,#crmTable tr.row-rdv td.check-cell input[type="checkbox"]:checked{background:var(--brand)!important}

/* Le survol ne modifie jamais la couleur métier de la ligne. */
#crmTable tbody tr.row-waiting:hover td{background:#fff!important}
#crmTable tbody tr.row-followup:hover td{background:#fff3e3!important}
#crmTable tbody tr.row-nurturing:hover td{background:#ffedef!important}
#crmTable tbody tr.row-rdv:hover td{background:#e8f8f0!important}
#crmTable tbody tr:hover td{filter:none!important;box-shadow:none!important}
#crmTable tbody tr:hover td.sticky-c{box-shadow:10px 0 18px -16px rgba(20,45,35,.8)!important}

#crmTable .activity-button{height:36px;border:0;border-radius:10px;background:rgba(255,255,255,.68);box-shadow:inset 0 0 0 1px rgba(8,123,89,.15);justify-content:center;padding:0 10px;transition:.18s ease}
#crmTable .activity-button:hover{background:#fff;box-shadow:inset 0 0 0 1px rgba(8,123,89,.3),0 4px 12px rgba(16,94,68,.08);transform:translateY(-1px)}
#crmTable .activity-button span{width:22px;height:22px;border-radius:7px;display:grid;place-items:center;background:#dff5ec}
#crmTable .delete-row{opacity:.35;transition:.18s ease}
#crmTable tr:hover .delete-row,#crmTable .delete-row:focus{opacity:1}
#tableView .sheet-footer{height:48px;padding:0 17px;background:#fbfcfc;border-top:1px solid #edf1ef}

@media(max-width:850px){
  #tableView .toolbar{border-radius:14px 14px 0 0}
  #tableView .sheet-card{border-radius:0 0 14px 14px}
}

/* Tableau comparatif des performances vendeurs. */
.seller-stats-head,.seller-performance-row{
  display:grid;
  grid-template-columns:minmax(180px,1fr) 70px 60px 105px;
  gap:10px;
  align-items:center;
}
.seller-stats-head{margin-top:17px;padding:0 0 9px;border-bottom:1px solid #e8eeeb}
.seller-stats-head span{font-size:8px;font-weight:700;letter-spacing:.45px;text-transform:uppercase;color:#929c97;text-align:center}
.seller-stats-head span:first-child{text-align:left}
.seller-performance-row{padding:10px 0}
.seller-identity{display:flex;align-items:center;gap:10px;min-width:0}
.seller-identity strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.seller-stat-value{text-align:center;font:800 13px Manrope;color:#27332e}
.seller-rdv-value{color:#079566}
.seller-rate{justify-self:center;min-width:52px;padding:5px 7px;border-radius:999px;background:#e4f7ef;color:#07825c!important;text-align:center;font-size:9px!important}
@media(max-width:560px){
  .seller-stats-head,.seller-performance-row{grid-template-columns:minmax(130px,1fr) 46px 40px 82px;gap:5px}
  .seller-stats-head span{font-size:7px}
}

/* Dashboard condensé : tous les indicateurs essentiels tiennent dans la première vue. */
.workspace{min-height:calc(100vh - 72px)!important}
#dashboardView .dashboard-title{margin-bottom:14px}
#dashboardView .dashboard-kpis{gap:11px;margin-bottom:12px}
#dashboardView .dashboard-kpi{min-height:132px;padding:14px 16px}
#dashboardView .dashboard-kpi-icon{width:30px;height:30px}
#dashboardView .dashboard-kpi span{margin-top:11px}
#dashboardView .dashboard-kpi strong{font-size:25px}
#dashboardView .dashboard-kpi small{margin-top:7px;padding-top:8px}
#dashboardView .dashboard-layout{grid-template-columns:1.45fr 1fr;gap:12px;margin-bottom:0;align-items:stretch}
#dashboardView .dashboard-panel{padding:15px 17px}
#dashboardView .status-results{gap:7px;margin-top:12px}
#dashboardView .status-card{padding:10px 11px}
#dashboardView .status-card i{height:4px;margin-bottom:8px}
#dashboardView .status-card strong{font-size:17px}
#dashboardView .seller-stats-head{margin-top:10px;padding-bottom:7px}
#dashboardView .seller-performance-row{padding:7px 0}
#dashboardView .seller-avatar{width:29px;height:29px}
.inline-details{margin-top:12px;padding-top:11px;border-top:1px solid #e9eeec}
.inline-details-title{display:flex;align-items:baseline;gap:8px}
.inline-details-title strong{font:800 11px Manrope;color:#26312d}
.inline-details-title span{font-size:8px;color:#98a09d}
.inline-details .metrics-table{grid-template-columns:repeat(4,1fr);gap:0 13px;margin-top:5px}
.inline-details .metric-line{padding:6px 0;font-size:8px}
.inline-details .metric-line strong{font-size:9px}
@media(max-width:1050px){#dashboardView .dashboard-layout{grid-template-columns:1fr}.inline-details .metrics-table{grid-template-columns:repeat(3,1fr)}}
@media(max-width:700px){.inline-details .metrics-table{grid-template-columns:1fr 1fr}}
