/* =====================================================
   TRADE MANAGER · CLIENTES PRO
===================================================== */

.clientes-page{
  display:grid;
  gap:18px;
}

/* HERO */
.clientes-hero{
  min-height:126px;
}

.clientes-hero-actions{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}

/* KPIS */
.clientes-kpis{
  display:grid;
  grid-template-columns:repeat(6,minmax(0,1fr));
  gap:14px;
}

/* TOOLBAR */
.clientes-toolbar{
  display:grid;
  grid-template-columns:1.5fr repeat(4,minmax(130px,.55fr));
  gap:12px;
  align-items:center;
}

.clientes-toolbar input,
.clientes-toolbar select{
  width:100%;
  min-height:48px;
  padding:0 14px;
  border:1px solid var(--line);
  border-radius:16px;
  background:#fff;
  color:var(--text);
  font-size:14px;
  font-weight:750;
  outline:none;
}

.clientes-toolbar input:focus,
.clientes-toolbar select:focus{
  border-color:rgba(15,107,87,.35);
  box-shadow:0 0 0 4px rgba(15,107,87,.09);
}

/* WORKSPACE */
.clientes-workspace{
  display:grid;
  grid-template-columns:minmax(0,1fr) 340px;
  gap:16px;
  align-items:start;
}

.clientes-table-panel{
  min-width:0;
}

.clientes-insights-panel{
  display:grid;
  gap:14px;
}

/* TABLE */
.clientes-table{
  min-width:1180px;
}

.clientes-table tbody tr{
  cursor:pointer;
  transition:.16s ease;
}

.clientes-table tbody tr:hover{
  transform:translateY(-1px);
  box-shadow:0 14px 28px rgba(15,23,42,.08);
}

.clientes-account{
  display:flex;
  align-items:center;
  gap:12px;
}

.clientes-avatar{
  width:48px;
  height:48px;
  display:grid;
  place-items:center;
  border-radius:17px;
  background:var(--primary-soft);
  color:var(--primary);
  font-size:22px;
  flex:0 0 auto;
}

.clientes-account strong{
  display:block;
  color:var(--heading);
  font-size:14px;
  font-weight:950;
}

.clientes-account small{
  display:block;
  margin-top:3px;
  color:var(--muted);
  font-size:12px;
  font-weight:750;
}

.clientes-brand-list{
  display:flex;
  gap:6px;
  flex-wrap:wrap;
}

.clientes-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:28px;
  padding:6px 10px;
  border-radius:999px;
  background:var(--primary-soft);
  color:var(--primary);
  font-size:11px;
  font-weight:950;
  white-space:nowrap;
}

.clientes-badge.success{
  background:var(--success-soft);
  color:var(--success);
}

.clientes-badge.warning{
  background:var(--warning-soft);
  color:var(--warning);
}

.clientes-badge.danger{
  background:var(--danger-soft);
  color:var(--danger);
}

.clientes-badge.blue{
  background:var(--blue-soft);
  color:var(--blue);
}

.clientes-badge.gold{
  background:var(--gold-soft);
  color:#9a6b00;
}

/* INSIGHTS */
.clientes-insight-card{
  padding:18px;
  border:1px solid var(--line-soft);
  border-radius:22px;
  background:linear-gradient(180deg,#fff,#fbfdfb);
  box-shadow:var(--shadow);
}

.clientes-insight-card h3{
  margin:0;
  color:var(--primary);
  font-size:16px;
  font-weight:950;
}

.clientes-insight-card p{
  margin:7px 0 0;
  color:var(--muted);
  font-size:13px;
  font-weight:650;
  line-height:1.35;
}

.clientes-insight-list{
  display:grid;
  gap:10px;
  margin-top:14px;
}

.clientes-insight-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:10px 12px;
  border-radius:15px;
  background:#fff;
  border:1px solid var(--line-soft);
}

.clientes-insight-row span{
  color:var(--text);
  font-size:13px;
  font-weight:850;
}

.clientes-insight-row strong{
  color:var(--primary);
  font-size:14px;
  font-weight:950;
}

/* EMPTY */
.clientes-empty{
  min-height:260px;
  display:grid;
  place-items:center;
  text-align:center;
  border-radius:22px;
  background:linear-gradient(135deg,#f8fafc,#eef8f4);
  color:var(--muted);
  font-weight:800;
}

/* XL DRAWER BASE PARA CLIENTES */
.crm-account-drawer{
  width:min(880px,100%);
}

.crm-account-head{
  display:flex;
  justify-content:space-between;
  gap:20px;
  align-items:flex-start;
  margin-bottom:20px;
}

.crm-account-head span{
  color:var(--primary);
  font-size:11px;
  font-weight:950;
  letter-spacing:.18em;
  text-transform:uppercase;
}

.crm-account-head h2{
  margin:7px 0 0;
  color:var(--heading);
  font-size:34px;
  line-height:1;
  font-weight:950;
  letter-spacing:-.05em;
}

.crm-account-head p{
  margin:10px 0 0;
  color:var(--muted);
  font-size:14px;
  font-weight:700;
}

.crm-account-actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-top:16px;
}

.crm-account-kpis{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:12px;
  margin-bottom:18px;
}

.crm-account-kpis article{
  padding:15px;
  border:1px solid var(--line-soft);
  border-radius:18px;
  background:#fff;
  box-shadow:var(--shadow-sm);
}

.crm-account-kpis span{
  display:block;
  color:var(--muted);
  font-size:10px;
  font-weight:950;
  letter-spacing:.08em;
}

.crm-account-kpis strong{
  display:block;
  margin-top:7px;
  color:var(--heading);
  font-size:24px;
  font-weight:950;
}

.crm-account-kpis small{
  display:block;
  margin-top:4px;
  color:var(--primary);
  font-size:11px;
  font-weight:900;
}

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

.crm-account-card{
  padding:18px;
  border:1px solid var(--line-soft);
  border-radius:22px;
  background:linear-gradient(180deg,#fff,#fbfdfb);
  box-shadow:var(--shadow);
}

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

.detail-item{
  padding:10px 12px;
  border-radius:14px;
  background:#fff;
  border:1px solid var(--line-soft);
}

.detail-label{
  color:var(--muted);
  font-size:10px;
  font-weight:950;
  letter-spacing:.08em;
  text-transform:uppercase;
}

.detail-value{
  margin-top:5px;
  color:var(--heading);
  font-size:13px;
  font-weight:850;
}

.crm-pill-list{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  margin-top:12px;
}

.crm-pill-list span{
  display:inline-flex;
  align-items:center;
  min-height:28px;
  padding:6px 10px;
  border-radius:999px;
  background:var(--primary-soft);
  color:var(--primary);
  font-size:11px;
  font-weight:950;
}

.crm-timeline-list{
  display:grid;
  gap:10px;
  margin-top:12px;
}

.crm-timeline-item{
  display:grid;
  grid-template-columns:auto 1fr;
  gap:10px;
  padding:12px;
  border:1px solid var(--line-soft);
  border-radius:16px;
  background:#fff;
}

.crm-timeline-item > span{
  width:38px;
  height:38px;
  display:grid;
  place-items:center;
  border-radius:13px;
  background:var(--primary-soft);
}

.crm-timeline-item strong{
  display:block;
  color:var(--heading);
  font-size:13px;
  font-weight:950;
}

.crm-timeline-item small{
  display:block;
  margin-top:3px;
  color:var(--muted);
  font-size:12px;
  font-weight:700;
}

.crm-empty{
  padding:16px;
  border-radius:16px;
  background:#f8fafc;
  color:var(--muted);
  font-size:13px;
  font-weight:800;
  text-align:center;
}
/* =====================================================
   CLIENTES PRO · REFINAMIENTO FINAL
===================================================== */

.clientes-kpis .tm-kpi{
  min-height:172px;
}

.clientes-kpis .tm-kpi-icon{
  width:54px;
  height:54px;
  font-size:25px;
}

.clientes-kpis .tm-kpi-label{
  font-size:11px;
  letter-spacing:.12em;
}

.clientes-toolbar{
  grid-template-columns:1fr;
}

.clientes-toolbar input{
  min-height:58px;
  font-size:16px;
  border-radius:20px;
}

.clientes-toolbar select{
  min-height:48px;
}

.clientes-toolbar::after{
  content:"";
  display:none;
}

.clientes-toolbar-filters{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:12px;
}

.clientes-workspace{
  grid-template-columns:minmax(0,1fr) 320px;
}

.clientes-table{
  min-width:1040px;
  border-spacing:0 12px;
}

.clientes-table tbody td{
  padding:16px 14px;
}

.clientes-account strong{
  font-size:15px;
}

.clientes-badge{
  box-shadow:inset 0 1px 0 rgba(255,255,255,.8);
}

.clientes-row-actions{
  display:flex;
  justify-content:flex-end;
}

.clientes-row-action{
  min-height:34px;
  padding:0 12px;
  border:1px solid var(--line);
  border-radius:999px;
  background:#fff;
  color:var(--primary);
  font-size:12px;
  font-weight:950;
}

.clientes-insight-card{
  padding:16px;
}

.clientes-insight-card h3{
  font-size:15px;
  text-transform:uppercase;
  letter-spacing:.08em;
}

.clientes-insight-card p{
  font-size:12px;
}

.clientes-insight-row{
  min-height:44px;
}

.clientes-insight-row strong{
  min-width:32px;
  height:32px;
  display:grid;
  place-items:center;
  border-radius:12px;
  background:var(--primary-soft);
}
/* =====================================================
   CLIENTES PRO · INSIGHTS EJECUTIVOS
===================================================== */

.clientes-insight-feature{
  border-top:4px solid var(--primary);
}

.clientes-insight-head{
  display:grid;
  grid-template-columns:auto 1fr;
  gap:12px;
  align-items:flex-start;
}

.clientes-insight-head > span{
  width:42px;
  height:42px;
  display:grid;
  place-items:center;
  border-radius:14px;
  background:var(--primary-soft);
  font-size:22px;
}

.clientes-insight-head h3{
  margin:0;
}

.clientes-insight-head p{
  margin:5px 0 0;
}

.clientes-insight-row.danger strong{
  background:var(--danger-soft);
  color:var(--danger);
}

.clientes-insight-row.warning strong{
  background:var(--warning-soft);
  color:var(--warning);
}
/* =====================================================
   CLIENTES PRO · WORKSPACE FULL WIDTH
===================================================== */

.clientes-workspace{
  grid-template-columns:1fr;
}

.clientes-table-panel{
  width:100%;
}

.clientes-insights-panel{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:16px;
}

.clientes-table{
  min-width:900px;
}

.clientes-empty-state{
  min-height:150px;
  display:grid;
  place-items:center;
  text-align:center;
  gap:6px;
  padding:24px;
}

.clientes-empty-icon{
  width:54px;
  height:54px;
  display:grid;
  place-items:center;
  border-radius:18px;
  background:var(--primary-soft);
  font-size:26px;
}

.clientes-empty-state strong{
  display:block;
  color:var(--heading);
  font-size:18px;
  font-weight:950;
}

.clientes-empty-state span{
  display:block;
  color:var(--muted);
  font-size:13px;
  font-weight:750;
}
/* =====================================================
   CLIENTES PRO · TABLA CRM FINAL
===================================================== */

.clientes-table-panel{
  overflow:hidden;
}

.clientes-table{
  min-width:100%;
}

.clientes-table th{
  white-space:nowrap;
}

.clientes-table td{
  white-space:normal;
}

.clientes-pro-row td:first-child{
  min-width:320px;
}

.clientes-pro-row td:nth-child(2){
  min-width:210px;
}

.clientes-pro-row td:nth-child(6){
  width:120px;
}

.clientes-empty-state{
  width:100%;
}

.clientes-empty-state strong,
.clientes-empty-state span{
  white-space:normal;
}
/* =====================================================
   CLIENTES PRO · DRAWER ACCOUNT 360 FINAL
===================================================== */

.crm-account-drawer{
  width:min(980px,calc(100vw - 40px));
  background:
    radial-gradient(circle at 92% 2%,rgba(25,165,125,.12),transparent 26%),
    linear-gradient(180deg,#fff,#f8fbfa);
}

.crm-account-head{
  position:sticky;
  top:0;
  z-index:3;
  padding:0 0 18px;
  margin:-4px 0 18px;
  background:linear-gradient(180deg,#fff 70%,rgba(255,255,255,.86));
  border-bottom:1px solid var(--line-soft);
}

.crm-account-head h2{
  max-width:680px;
}

.crm-account-actions .ghost-btn,
.crm-account-actions .pro-btn{
  min-height:40px;
  border-radius:14px;
  font-size:12px;
  text-transform:uppercase;
  letter-spacing:.04em;
}

.crm-account-kpis{
  grid-template-columns:repeat(6,minmax(0,1fr));
}

.crm-account-kpis article{
  position:relative;
  overflow:hidden;
  min-height:104px;
  border-top:4px solid var(--primary);
}

.crm-account-kpis article:nth-child(2){border-top-color:var(--blue);}
.crm-account-kpis article:nth-child(3){border-top-color:var(--gold);}
.crm-account-kpis article:nth-child(4){border-top-color:var(--success);}
.crm-account-kpis article:nth-child(5){border-top-color:#f97316;}
.crm-account-kpis article:nth-child(6){border-top-color:#8b5cf6;}

.crm-account-kpis article::after{
  content:"";
  position:absolute;
  right:-26px;
  top:-26px;
  width:74px;
  height:74px;
  border-radius:999px;
  background:rgba(15,107,87,.08);
}

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

.crm-account-card{
  position:relative;
  overflow:hidden;
}

.crm-account-card::before{
  content:"";
  position:absolute;
  inset:0 0 auto 0;
  height:4px;
  background:linear-gradient(90deg,var(--primary),var(--primary-2));
  opacity:.9;
}

.crm-account-card .crm-section-head{
  margin-bottom:14px;
}

.crm-account-card .crm-section-head span{
  color:var(--primary);
}

.detail-grid{
  gap:12px;
}

.detail-item{
  min-height:64px;
  background:linear-gradient(180deg,#fff,#fbfdfb);
}

.detail-value{
  word-break:break-word;
}

.crm-account-card > .crm-timeline-list,
.crm-account-card > .crm-pill-list{
  position:relative;
  z-index:1;
}

.crm-row-actions{
  display:flex;
  gap:8px;
  margin-top:8px;
  flex-wrap:wrap;
}

.crm-account-kpis.mini{
  grid-template-columns:repeat(4,minmax(0,1fr));
}

.crm-account-kpis.mini article{
  min-height:92px;
}

@media(max-width:1180px){
  .crm-account-drawer{
    width:min(940px,calc(100vw - 24px));
  }

  .crm-account-kpis{
    grid-template-columns:repeat(3,minmax(0,1fr));
  }
}
/* =====================================================
   CLIENTES PRO · DETAIL CARDS PREMIUM
===================================================== */

.detail-item{
  position:relative;
  overflow:hidden;
  padding:13px 14px 13px 16px;
}

.detail-item::before{
  content:"";
  position:absolute;
  left:0;
  top:12px;
  bottom:12px;
  width:4px;
  border-radius:999px;
  background:var(--primary);
  opacity:.55;
}

.detail-label{
  display:flex;
  align-items:center;
  gap:6px;
}

.detail-label::before{
  content:"•";
  width:18px;
  height:18px;
  display:grid;
  place-items:center;
  border-radius:7px;
  background:var(--primary-soft);
  color:var(--primary);
  font-size:14px;
  line-height:1;
}

.crm-account-card:nth-child(2) .detail-label::before{
  content:"📍";
}

.crm-account-card:nth-child(3) .detail-label::before{
  content:"☎";
}

.crm-account-card:nth-child(4) .detail-label::before{
  content:"📊";
}

.crm-account-card:nth-child(5) .detail-label::before{
  content:"%";
}

.crm-account-card:nth-child(6) .detail-label::before{
  content:"💰";
}

.detail-value{
  font-size:14px;
  line-height:1.25;
}

.crm-account-card{
  transition:.18s ease;
}

.crm-account-card:hover{
  transform:translateY(-1px);
  box-shadow:0 18px 38px rgba(15,23,42,.095);
}

.crm-account-card > .crm-section-head h3{
  font-size:18px;
}

.crm-account-card > .crm-section-head strong{
  min-height:32px;
  display:inline-flex;
  align-items:center;
  padding:0 11px;
  border-radius:999px;
  background:var(--primary-soft);
  color:var(--primary);
  font-size:12px;
  font-weight:950;
}

.crm-timeline-item{
  transition:.16s ease;
}

.crm-timeline-item:hover{
  transform:translateY(-1px);
  box-shadow:var(--shadow-sm);
}

.crm-empty{
  border:1px dashed var(--line);
}
/* =====================================================
   CLIENTES PRO · CIERRE FINAL
===================================================== */

.crm-account-drawer{
  width:min(1060px,calc(100vw - 34px));
}

.crm-account-head{
  padding-bottom:20px;
  margin-bottom:24px;
}

.crm-account-head h2{
  font-size:42px;
}

.crm-account-tags{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  margin-top:14px;
}

.crm-account-tags span{
  min-height:30px;
  display:inline-flex;
  align-items:center;
  padding:6px 11px;
  border-radius:999px;
  background:var(--primary-soft);
  color:var(--primary);
  font-size:12px;
  font-weight:950;
}

.crm-account-kpis{
  display:grid;
  grid-template-columns:repeat(6,minmax(0,1fr));
  gap:14px;
  margin:24px 0;
  position:relative;
  z-index:1;
}

.crm-account-kpis article{
  min-height:118px;
}

.crm-account-kpis strong{
  font-size:30px;
}

.crm-account-grid{
  gap:18px;
}

.crm-account-card{
  padding:22px;
}

.detail-item{
  min-height:76px;
}

.detail-label{
  font-size:11px;
  letter-spacing:.12em;
}

.detail-value{
  margin-top:8px;
  font-size:18px;
  line-height:1.22;
  font-weight:950;
  color:var(--heading);
}

.crm-empty{
  min-height:64px;
  display:grid;
  place-items:center;
  border:1px dashed var(--line);
  border-radius:18px;
  background:#f8fafc;
  color:var(--muted);
  font-size:13px;
  font-weight:850;
}

.crm-account-actions{
  margin-top:18px;
}

.crm-account-actions .ghost-btn,
.crm-account-actions .pro-btn{
  min-width:130px;
}

.crm-pill-list span{
  text-transform:none;
}

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

  .crm-account-grid{
    grid-template-columns:1fr;
  }
}
/* =====================================================
   CLIENTES PRO · KPI FILTERS
===================================================== */

.clientes-kpis .tm-kpi{
  cursor:pointer;
  transition:.18s ease;
}

.clientes-kpis .tm-kpi:hover{
  transform:translateY(-2px);
  box-shadow:0 18px 40px rgba(15,23,42,.10);
}

.clientes-kpis .tm-kpi.active{
  outline:3px solid rgba(15,107,87,.16);
  border-color:rgba(15,107,87,.35);
}
.cliente-brand-selector{
  display:flex;
  align-items:center;
  gap:10px;
  padding:14px 18px;
  border:1px solid var(--border);
  border-radius:16px;
  background:#fff;
  cursor:pointer;
  transition:.25s;
}

.cliente-brand-selector:hover{
  transform:translateY(-2px);
  box-shadow:0 12px 24px rgba(0,0,0,.08);
}

.cliente-brand-selector input{
  accent-color:#0f766e;
}
.drawer-actions{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:16px;
  margin-top:28px;
}

.drawer-actions-right{
  display:flex;
  gap:12px;
}

.danger-btn{
  border:none;
  background:#fee2e2;
  color:#b91c1c;
  padding:14px 20px;
  border-radius:14px;
  font-weight:800;
  cursor:pointer;
}
/* =====================================================
   CLIENTES PRO · EDITOR FINAL
===================================================== */

.crm-account-editor-drawer{
  width:min(980px,calc(100vw - 34px));
  background:
    radial-gradient(circle at 92% 0%,rgba(25,165,125,.12),transparent 28%),
    linear-gradient(180deg,#fff,#f8fbfa);
}

.crm-account-editor-drawer .drawer-head{
  position:sticky;
  top:0;
  z-index:5;
  display:flex;
  justify-content:space-between;
  gap:20px;
  padding:4px 0 18px;
  margin:0 0 20px;
  background:linear-gradient(180deg,#fff 72%,rgba(255,255,255,.88));
  border-bottom:1px solid var(--line-soft);
}

.crm-account-editor-drawer .drawer-title{
  font-size:36px;
}

.cliente-editor-kpis{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:10px;
  margin-top:16px;
}

.cliente-editor-kpi{
  min-height:68px;
  padding:12px 14px;
  border:1px solid var(--line-soft);
  border-radius:18px;
  background:#fff;
  box-shadow:var(--shadow-sm);
}

.cliente-editor-kpi span{
  display:block;
  color:var(--muted);
  font-size:10px;
  font-weight:950;
  letter-spacing:.1em;
  text-transform:uppercase;
}

.cliente-editor-kpi strong{
  display:block;
  margin-top:7px;
  color:var(--heading);
  font-size:18px;
  font-weight:950;
}

.editor-tabs{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin:0 0 22px;
  padding:8px;
  border:1px solid var(--line-soft);
  border-radius:22px;
  background:#fff;
  box-shadow:var(--shadow-sm);
}

.editor-tab{
  min-height:44px;
  padding:0 16px;
  border:0;
  border-radius:15px;
  background:transparent;
  color:var(--primary);
  font-size:13px;
  font-weight:950;
}

.editor-tab.active{
  background:linear-gradient(135deg,var(--primary),var(--primary-2));
  color:#fff;
  box-shadow:0 12px 24px rgba(15,107,87,.18);
}

.editor-panel{
  display:none;
  padding:22px;
  border:1px solid var(--line-soft);
  border-radius:24px;
  background:linear-gradient(180deg,#fff,#fbfdfb);
  box-shadow:var(--shadow);
}

.editor-panel.active{
  display:block;
}

.crm-account-editor-drawer .form-grid{
  gap:16px;
}

.crm-account-editor-drawer .form-field input,
.crm-account-editor-drawer .form-field select,
.crm-account-editor-drawer .form-field textarea{
  min-height:52px;
  border-radius:18px;
  font-size:15px;
}

.crm-account-editor-drawer textarea{
  min-height:150px;
}

.cliente-brand-selector{
  display:flex;
  align-items:center;
  gap:10px;
  min-height:52px;
  padding:12px 16px;
  border:1px solid var(--line);
  border-radius:16px;
  background:#fff;
  color:var(--primary);
  font-size:13px;
  font-weight:950;
  cursor:pointer;
  box-shadow:var(--shadow-sm);
}

.cliente-brand-selector:hover{
  transform:translateY(-1px);
  box-shadow:0 14px 28px rgba(15,23,42,.08);
}

.cliente-brand-selector input{
  accent-color:var(--primary);
}

.crm-account-editor-drawer .drawer-actions{
  position:sticky;
  bottom:0;
  z-index:6;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  margin:22px -24px -24px;
  padding:16px 24px;
  background:rgba(255,255,255,.94);
  border-top:1px solid var(--line-soft);
  backdrop-filter:blur(12px);
}

.drawer-actions-right{
  display:flex;
  gap:12px;
  margin-left:auto;
}

.danger-btn{
  min-height:44px;
  padding:0 18px;
  border:0;
  border-radius:15px;
  background:var(--danger-soft);
  color:var(--danger);
  font-size:13px;
  font-weight:950;
}
/* =====================================================
   CLIENTES PRO · ACCOUNT 360 ACCORDION
===================================================== */

.crm-account-card.is-collapsible{
  cursor:pointer;
}

.crm-account-card.is-collapsible .crm-section-head{
  position:relative;
  padding-right:44px;
}

.crm-account-card.is-collapsible .crm-section-head::after{
  content:"⌄";
  position:absolute;
  right:0;
  top:0;
  width:34px;
  height:34px;
  display:grid;
  place-items:center;
  border-radius:12px;
  background:var(--primary-soft);
  color:var(--primary);
  font-size:20px;
  font-weight:950;
}

.crm-account-card.is-collapsible.is-collapsed .crm-section-head::after{
  content:"›";
}

.crm-account-card.is-collapsed > *:not(.crm-section-head){
  display:none !important;
}

.crm-account-card.is-collapsed{
  min-height:auto;
  padding-bottom:18px;
}

.crm-account-card.is-collapsed .crm-section-head{
  margin-bottom:0;
}

.crm-account-card.is-collapsed h3{
  margin-bottom:0;
}
/* =====================================================
   CLIENTES PRO · CIERRE VISUAL DEFINITIVO
===================================================== */

.clientes-page{
  gap:20px;
}

.clientes-hero{
  border-top:4px solid var(--primary);
}

.clientes-hero .pro-btn,
.clientes-hero .ghost-btn{
  white-space:nowrap;
}

.clientes-kpis .tm-kpi{
  min-height:158px;
}

.clientes-kpis .tm-kpi strong{
  font-size:34px;
}

.clientes-toolbar{
  gap:14px;
}

.clientes-toolbar-filters{
  align-items:center;
}

.clientes-table-panel .tm-panel-head{
  margin-bottom:10px;
}

.clientes-table{
  border-spacing:0 10px;
}

.clientes-table th{
  padding-bottom:6px;
  font-size:10px;
  letter-spacing:.12em;
}

.clientes-table td{
  padding:13px 14px;
}

.clientes-pro-row td:first-child{
  min-width:280px;
}

.clientes-account,
.cliente-pro-main{
  min-height:52px;
}

.clientes-avatar,
.cliente-pro-avatar{
  width:44px;
  height:44px;
  border-radius:15px;
}

.clientes-badge,
.brand-chip,
.cliente-status-chip,
.cliente-potencial-chip,
.radar-status{
  min-height:28px;
  padding:6px 10px;
  font-size:10px;
  letter-spacing:.03em;
}

.clientes-row-action{
  min-height:36px;
  padding:0 14px;
  box-shadow:var(--shadow-sm);
}

.clientes-insights-panel{
  margin-top:2px;
}

.clientes-insight-card{
  min-height:178px;
}

.clientes-insight-head > span{
  flex-shrink:0;
}

/* Drawer 360 más limpio */
.crm-account-drawer{
  border-radius:0;
}

.crm-account-head{
  padding-top:4px;
}

.crm-account-head h2{
  font-size:38px;
}

.crm-account-tags{
  margin-top:12px;
}

.crm-account-kpis{
  margin:18px 0 20px;
}

.crm-account-kpis article{
  min-height:104px;
}

.crm-account-kpis strong{
  font-size:27px;
}

.crm-account-card{
  border-radius:22px;
}

.crm-account-card.is-collapsed{
  background:#fff;
}

.crm-account-card.is-collapsed .crm-section-head::after{
  opacity:.75;
}

.detail-item{
  min-height:68px;
}

.detail-value{
  font-size:16px;
}

.crm-timeline-item{
  border-radius:16px;
}

/* Editor Cliente PRO */
.crm-account-editor-drawer{
  border-radius:0;
}

.crm-account-editor-drawer .drawer-title{
  font-size:34px;
}

.cliente-editor-kpis{
  margin-top:14px;
}

.cliente-editor-kpi{
  min-height:62px;
}

.cliente-editor-kpi strong{
  font-size:16px;
}

.editor-tabs{
  position:sticky;
  top:142px;
  z-index:4;
}

.editor-tab{
  min-width:128px;
}

.editor-panel{
  padding:20px;
}

.crm-account-editor-drawer .form-grid{
  gap:14px;
}

.crm-account-editor-drawer .form-field input,
.crm-account-editor-drawer .form-field select{
  min-height:48px;
}

.crm-account-editor-drawer .form-field textarea{
  min-height:132px;
}

.cliente-brand-selector{
  flex:1 1 210px;
}

.crm-account-editor-drawer .drawer-actions{
  box-shadow:0 -18px 38px rgba(15,23,42,.08);
}

/* Estados visuales */
.clientes-kpis .tm-kpi.active{
  background:linear-gradient(180deg,#fff,#eef8f4);
}

.clientes-empty-state,
.crm-empty{
  background:
    radial-gradient(circle at 50% 0%,rgba(15,107,87,.08),transparent 34%),
    #f8fafc;
}
/* =====================================================
   CLIENTES · REMATE VISUAL DASHBOARD FINAL
===================================================== */

.clientes-page{
  max-width:1480px;
  margin:0 auto;
  gap:16px !important;
}

.clientes-hero{
  min-height:0 !important;
  padding:28px 34px !important;
  border-top:4px solid var(--primary) !important;
  border-radius:30px !important;
}

.clientes-hero h1{
  font-size:52px !important;
  letter-spacing:-.06em !important;
}

.clientes-hero p{
  max-width:760px !important;
}

.clientes-hero-actions .pro-btn{
  min-height:54px !important;
  padding:0 24px !important;
  font-size:13px !important;
}

.clientes-hero-actions .ghost-btn{
  min-height:46px !important;
}

/* KPIS más compactos y alineados */
.clientes-kpis{
  grid-template-columns:repeat(6,minmax(0,1fr)) !important;
  gap:12px !important;
}

.clientes-kpis .tm-kpi{
  min-height:138px !important;
  padding:16px !important;
}

.clientes-kpis .tm-kpi-icon{
  width:48px !important;
  height:48px !important;
  font-size:24px !important;
}

.clientes-kpis .tm-kpi strong{
  font-size:32px !important;
}

/* Centro de trabajo */
.clientes-page > .tm-panel{
  padding:24px !important;
  border-top:4px solid var(--primary) !important;
  border-radius:30px !important;
}

.clientes-toolbar{
  gap:12px !important;
}

.clientes-toolbar input{
  min-height:54px !important;
  font-size:15px !important;
}

.clientes-toolbar-filters{
  grid-template-columns:repeat(4,minmax(0,1fr)) !important;
  gap:10px !important;
}

.clientes-toolbar select{
  min-height:46px !important;
  font-size:13px !important;
}

/* Workspace */
.clientes-workspace{
  grid-template-columns:minmax(0,1fr) !important;
  gap:14px !important;
}

.clientes-table-panel{
  padding:24px !important;
  border-top:4px solid var(--primary) !important;
  border-radius:30px !important;
}

.clientes-table{
  min-width:100% !important;
}

.clientes-table th{
  color:var(--muted) !important;
  font-size:10px !important;
  font-weight:950 !important;
  letter-spacing:.13em !important;
  text-transform:uppercase !important;
}

.clientes-table td{
  padding:12px 14px !important;
}

.clientes-pro-row td:first-child{
  min-width:260px !important;
}

/* Insights en línea más premium */
.clientes-insights-panel{
  grid-template-columns:repeat(3,minmax(0,1fr)) !important;
  gap:14px !important;
}

.clientes-insight-card{
  min-height:150px !important;
  padding:18px !important;
  border-top:4px solid var(--primary) !important;
  border-radius:26px !important;
  background:
    radial-gradient(circle at 92% 10%,rgba(25,165,125,.10),transparent 34%),
    #fff !important;
}

.clientes-insight-head > span{
  width:48px !important;
  height:48px !important;
  font-size:24px !important;
}

.clientes-insight-card h3{
  color:var(--heading) !important;
  font-size:18px !important;
  letter-spacing:-.02em !important;
  text-transform:none !important;
}

.clientes-insight-card p{
  font-size:12px !important;
}

.clientes-insight-list{
  gap:8px !important;
  margin-top:12px !important;
}

.clientes-insight-row{
  min-height:38px !important;
  padding:8px 11px !important;
}

.clientes-insight-row span{
  font-size:12px !important;
}

.clientes-insight-row strong{
  width:30px !important;
  height:30px !important;
  min-width:30px !important;
}

/* Tablet vertical */
@media(max-width:1180px){
  .clientes-kpis{
    grid-template-columns:repeat(3,minmax(0,1fr)) !important;
  }

  .clientes-toolbar-filters,
  .clientes-insights-panel{
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  }
}
/* =====================================================
   CLIENTES · CIERRE VISUAL FINAL
===================================================== */

.clientes-pro-final{
  max-width:1480px;
  margin:0 auto;
  gap:14px !important;
}

.clientes-hero-final{
  min-height:138px !important;
  padding:26px 34px !important;
  border-top:4px solid var(--primary) !important;
  border-radius:30px !important;
  background:
    radial-gradient(circle at 92% 8%,rgba(25,165,125,.12),transparent 34%),
    #fff !important;
}

.clientes-hero-final h1{
  font-size:54px !important;
  line-height:.95 !important;
}

.clientes-hero-actions{
  justify-content:flex-end;
  max-width:460px;
}

.clientes-hero-actions .pro-btn{
  min-width:210px;
}

.clientes-kpis-final{
  grid-template-columns:repeat(6,minmax(0,1fr)) !important;
  gap:12px !important;
}

.clientes-kpis-final .tm-kpi{
  min-height:126px !important;
  padding:14px !important;
  border-radius:24px !important;
}

.clientes-kpis-final .tm-kpi-icon{
  width:44px !important;
  height:44px !important;
  font-size:23px !important;
}

.clientes-kpis-final .tm-kpi strong{
  font-size:30px !important;
}

.clientes-control-panel,
.clientes-table-panel-final{
  padding:22px !important;
  border-top:4px solid var(--primary) !important;
  border-radius:30px !important;
}

.clientes-control-panel .tm-panel-head{
  margin-bottom:14px !important;
}

.clientes-toolbar input{
  min-height:52px !important;
}

.clientes-toolbar-filters{
  grid-template-columns:repeat(4,minmax(0,1fr)) !important;
}

.clientes-workspace-final{
  grid-template-columns:1fr !important;
  gap:14px !important;
}

.clientes-table-panel-final .tm-panel-head{
  margin-bottom:8px !important;
}

.clientes-table-wrap-final{
  border-radius:24px !important;
  background:#fff;
}

.clientes-table{
  min-width:100% !important;
}

.clientes-table th{
  padding:12px 14px !important;
  color:var(--muted) !important;
  font-size:10px !important;
  font-weight:950 !important;
  letter-spacing:.14em !important;
  text-transform:uppercase !important;
}

.clientes-table td{
  padding:12px 14px !important;
}

.clientes-master-empty{
  min-height:210px;
  display:grid;
  place-items:center;
  text-align:center;
  gap:10px;
  margin-top:12px;
  padding:28px;
  border:1px dashed var(--line-soft);
  border-radius:24px;
  background:
    radial-gradient(circle at 50% 0%,rgba(25,165,125,.10),transparent 34%),
    #f8fafc;
}

.clientes-master-empty-icon{
  width:62px;
  height:62px;
  display:grid;
  place-items:center;
  border-radius:22px;
  background:var(--primary-soft);
  font-size:30px;
}

.clientes-master-empty strong{
  color:var(--heading);
  font-size:24px;
  font-weight:1000;
}

.clientes-master-empty span{
  color:var(--muted);
  font-size:14px;
  font-weight:850;
}

.clientes-master-empty > div:last-child{
  display:flex;
  gap:10px;
  margin-top:4px;
}

.clientes-insights-final{
  grid-template-columns:repeat(3,minmax(0,1fr)) !important;
  gap:14px !important;
}

.clientes-insights-final .clientes-insight-card{
  min-height:146px !important;
  padding:16px !important;
  border-top:4px solid var(--primary) !important;
  border-radius:26px !important;
  background:
    radial-gradient(circle at 92% 10%,rgba(25,165,125,.10),transparent 34%),
    #fff !important;
}

.clientes-insights-final .clientes-insight-head > span{
  width:46px !important;
  height:46px !important;
}

.clientes-insights-final h3{
  color:var(--heading) !important;
  font-size:18px !important;
  text-transform:none !important;
  letter-spacing:-.02em !important;
}

.clientes-insight-list.compact{
  gap:7px !important;
  margin-top:10px !important;
}

.clientes-insight-list.compact .clientes-insight-row{
  min-height:36px !important;
  padding:7px 10px !important;
}

.clientes-insight-list.compact .clientes-insight-row span{
  font-size:12px !important;
}

.clientes-insight-list.compact .clientes-insight-row strong{
  width:28px !important;
  height:28px !important;
  min-width:28px !important;
}

@media(max-width:1180px){
  .clientes-kpis-final{
    grid-template-columns:repeat(3,minmax(0,1fr)) !important;
  }

  .clientes-toolbar-filters,
  .clientes-insights-final{
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  }
}
/* =====================================================
   CLIENTES · LISTADO COMPACTO ALFABÉTICO
===================================================== */

.clientes-table{
  border-spacing:0 8px !important;
}

.clientes-table td{
  padding:8px 10px !important;
  vertical-align:middle !important;
}

.clientes-pro-row{
  height:58px !important;
}

.clientes-pro-row td:first-child{
  min-width:360px !important;
  max-width:420px !important;
}

.cliente-pro-main{
  display:grid !important;
  grid-template-columns:40px minmax(0,1fr) !important;
  gap:10px !important;
  align-items:center !important;
  min-height:42px !important;
}

.cliente-pro-avatar{
  width:40px !important;
  height:40px !important;
  border-radius:14px !important;
  font-size:20px !important;
}

.cliente-pro-main > div:last-child{
  min-width:0 !important;
}

.cliente-pro-main strong{
  display:block !important;
  max-width:100% !important;
  overflow:hidden !important;
  text-overflow:ellipsis !important;
  white-space:nowrap !important;
  font-size:15px !important;
  line-height:1.05 !important;
}

.cliente-pro-main small{
  display:block !important;
  max-width:100% !important;
  overflow:hidden !important;
  text-overflow:ellipsis !important;
  white-space:nowrap !important;
  margin-top:4px !important;
  font-size:11px !important;
  line-height:1.05 !important;
}

.cliente-pro-chips{
  display:flex !important;
  gap:6px !important;
  flex-wrap:nowrap !important;
  overflow:hidden !important;
  max-width:220px !important;
}

.cliente-pro-chips .brand-chip{
  flex:0 0 auto !important;
  max-width:120px !important;
  overflow:hidden !important;
  text-overflow:ellipsis !important;
  white-space:nowrap !important;
}

.cliente-status-chip,
.cliente-potencial-chip,
.radar-status,
.brand-chip{
  min-height:24px !important;
  padding:4px 9px !important;
  font-size:10px !important;
  line-height:1 !important;
  white-space:nowrap !important;
}

.clientes-row-action{
  min-height:30px !important;
  padding:0 11px !important;
  font-size:11px !important;
}
/* =====================================================
   CLIENTES · COLORES POR MARCA
===================================================== */

.brand-chip{
  border:1px solid transparent !important;
}

.brand-chip.borges{
  background:rgba(15,107,87,.12) !important;
  color:#0f6b57 !important;
  border-color:rgba(15,107,87,.25) !important;
}

.brand-chip.capricho{
  background:rgba(245,158,11,.15) !important;
  color:#92400e !important;
  border-color:rgba(245,158,11,.30) !important;
}

.brand-chip.castillo{
  background:rgba(220,38,38,.12) !important;
  color:#991b1b !important;
  border-color:rgba(220,38,38,.25) !important;
}

.brand-chip.default{
  background:#f1f5f9 !important;
  color:#64748b !important;
  border-color:#e2e8f0 !important;
}
/* =====================================================
   MODALES PRO · GLOBAL
===================================================== */

.pro-modal-backdrop{
  position:fixed;
  inset:0;
  z-index:99999;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:22px;
  background:rgba(15,23,42,.58);
  backdrop-filter:blur(8px);
}

.pro-modal{
  width:min(520px,100%);
  border-radius:28px;
  background:#fff;
  box-shadow:0 28px 80px rgba(15,23,42,.28);
  overflow:hidden;
  border:1px solid rgba(255,255,255,.7);
}

.pro-modal-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:18px;
  padding:24px 24px 10px;
}

.pro-modal-icon{
  width:52px;
  height:52px;
  display:grid;
  place-items:center;
  border-radius:18px;
  background:var(--primary-soft);
  color:var(--primary);
  font-size:28px;
  flex:0 0 auto;
}

.pro-modal-title{
  margin:0;
  color:var(--heading);
  font-size:24px;
  font-weight:950;
  letter-spacing:-.04em;
}

.pro-modal-text{
  margin:8px 0 0;
  color:var(--muted);
  font-size:14px;
  font-weight:750;
  line-height:1.45;
  white-space:pre-line;
}

.pro-modal-close{
  width:38px;
  height:38px;
  border:0;
  border-radius:14px;
  background:#f1f5f9;
  color:var(--muted);
  font-size:22px;
  font-weight:950;
}

.pro-modal-body{
  padding:8px 24px 4px;
}

.pro-modal-input{
  width:100%;
  min-height:52px;
  padding:0 15px;
  border:1px solid var(--line);
  border-radius:17px;
  background:#fff;
  color:var(--heading);
  font-size:16px;
  font-weight:850;
  outline:none;
}

.pro-modal-input:focus{
  border-color:rgba(15,107,87,.45);
  box-shadow:0 0 0 4px rgba(15,107,87,.10);
}

.pro-modal-actions{
  display:flex;
  justify-content:flex-end;
  gap:10px;
  padding:18px 24px 24px;
}

.pro-modal-btn{
  min-height:44px;
  padding:0 18px;
  border:0;
  border-radius:15px;
  font-size:13px;
  font-weight:950;
}

.pro-modal-btn.cancel{
  background:#f1f5f9;
  color:var(--muted);
}

.pro-modal-btn.confirm{
  background:linear-gradient(135deg,var(--primary),var(--primary-2));
  color:#fff;
}

.pro-modal.warning .pro-modal-icon{
  background:var(--warning-soft);
  color:var(--warning);
}

.pro-modal.danger .pro-modal-icon{
  background:var(--danger-soft);
  color:var(--danger);
}

.pro-modal.success .pro-modal-icon{
  background:var(--success-soft);
  color:var(--success);
}

.pro-modal.danger .pro-modal-btn.confirm{
  background:linear-gradient(135deg,#dc2626,#991b1b);
}
/* =====================================================
   CLIENTES · ACCIONES MASIVAS
===================================================== */

.clientes-bulkbar{
  display:none;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
  margin:10px 0 14px;
  padding:12px;
  border:1px solid var(--line-soft);
  border-radius:18px;
  background:#fff;
  box-shadow:var(--shadow-sm);
}

.clientes-bulkbar.active{
  display:flex;
}

.clientes-bulkbar strong{
  margin-right:auto;
  color:var(--primary);
  font-size:13px;
  font-weight:950;
}

.cliente-select-check,
#clientesSelectAll{
  width:18px;
  height:18px;
  accent-color:var(--primary);
}

.mini-btn.danger{
  background:var(--danger-soft);
  color:var(--danger);
}
/* =====================================================
   CLIENTES · CHECKBOX COMPACTO TABLA
===================================================== */

.clientes-table th:first-child,
.clientes-table td:first-child{
  width:34px !important;
  min-width:34px !important;
  max-width:34px !important;
  padding:8px 6px !important;
  text-align:center !important;
}

.cliente-check-cell{
  width:34px !important;
  min-width:34px !important;
  max-width:34px !important;
}

#clientesSelectAll,
.cliente-select-check{
  width:16px !important;
  height:16px !important;
  min-width:16px !important;
  min-height:16px !important;
  margin:0 !important;
  transform:none !important;
  accent-color:var(--primary);
}

.clientes-table{
  table-layout:fixed !important;
}

.clientes-table th:nth-child(2),
.clientes-table td:nth-child(2){
  width:36% !important;
}

.clientes-table th:nth-child(3),
.clientes-table td:nth-child(3){
  width:18% !important;
}

.clientes-table th:nth-child(4),
.clientes-table td:nth-child(4),
.clientes-table th:nth-child(5),
.clientes-table td:nth-child(5){
  width:13% !important;
}

.clientes-table th:nth-child(6),
.clientes-table td:nth-child(6){
  width:12% !important;
}

.clientes-table th:nth-child(7),
.clientes-table td:nth-child(7){
  width:8% !important;
}
/* =====================================================
   CLIENTES · BARRA ACCIONES MASIVAS
===================================================== */

.clientes-bulkbar{
  display:none;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
  margin:10px 0 14px;
  padding:10px 12px;
  border:1px solid var(--line-soft);
  border-radius:18px;
  background:#f8fafc;
}

.clientes-bulkbar.active{
  display:flex !important;
}

.clientes-bulkbar strong{
  margin-right:auto;
  color:var(--heading);
  font-size:13px;
  font-weight:950;
}

.clientes-bulkbar .mini-btn{
  min-height:32px;
  padding:0 11px;
  border-radius:999px;
}
.clientes-bulkbar.active{
  display:flex !important;
  position:sticky;
  top:8px;
  z-index:20;
}
/* =====================================================
   CLIENTES · SELECCIÓN MASIVA FINAL
===================================================== */

.clientes-bulkbar.active{
  display:flex !important;
  position:sticky !important;
  top:8px !important;
  z-index:40 !important;
  box-shadow:0 14px 35px rgba(15,23,42,.12);
}

.pro-modal select.pro-modal-input{
  min-height:52px;
  font-weight:900;
  border-radius:16px;
}
.zona-cobertura-pro {
  border: 1px solid rgba(15, 61, 50, .10);
  border-radius: 24px;
  background: #fff;
  padding: 16px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9);
}

.zona-cobertura-selected {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 38px;
  margin-bottom: 12px;
}

.zona-chip {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 13px;
  border-radius: 999px;
  background: #e7f7f2;
  color: #08705d;
  font-weight: 950;
  font-size: 13px;
}

.zona-empty {
  color: #667085;
  font-weight: 800;
  font-size: 14px;
}

.zona-cobertura-search {
  width: 100%;
  min-height: 46px !important;
  border-radius: 18px !important;
  margin-bottom: 12px;
}

.zona-cobertura-list {
  max-height: 260px;
  overflow: auto;
  border-radius: 18px;
  border: 1px solid rgba(15, 61, 50, .08);
  background: #fbfefd;
  padding: 8px;
}

.zona-cobertura-option {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 42px;
  padding: 8px 10px;
  border-radius: 14px;
  font-size: 15px !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
  color: #102a25 !important;
  cursor: pointer;
}

.zona-cobertura-option:hover {
  background: #eef8f5;
}

.zona-cobertura-option input {
  width: 20px;
  height: 20px;
  accent-color: #07876f;
}

.zona-cobertura-pro small {
  display: block;
  margin-top: 10px;
  color: #08705d;
  font-weight: 950;
}