/* ============================================================
   HACIENDA SAN MIGUEL – CRM COMERCIAL v4
   Design System – Clean, Professional, Zero-Overlap
   ============================================================ */

/* ── VARIABLES ─────────────────────────────────────────────── */
:root {
  --sidebar-w:           240px;
  --sidebar-collapsed-w: 64px;
  --topbar-h:            60px;

  --bg-app:    #f0f2f5;
  --bg-card:   #ffffff;
  --bg-sidebar: #0f172a;
  --bg-sidebar-hover:  #1e293b;
  --bg-sidebar-active: #1d4ed8;

  --text-primary:   #0f172a;
  --text-secondary: #64748b;
  --text-sidebar:   #94a3b8;
  --text-sidebar-active: #ffffff;

  --border:       #e2e8f0;
  --border-focus: #3b82f6;

  --shadow-sm: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
  --shadow-md: 0 4px 6px rgba(0,0,0,.07), 0 2px 4px rgba(0,0,0,.06);
  --shadow-lg: 0 10px 15px rgba(0,0,0,.1), 0 4px 6px rgba(0,0,0,.05);

  --blue:   #3b82f6; --blue-light: #eff6ff; --blue-dark: #1d4ed8;
  --teal:   #14b8a6; --teal-light: #f0fdfa;
  --green:  #22c55e; --green-light: #f0fdf4;
  --purple: #a855f7; --purple-light: #faf5ff;
  --orange: #f97316; --orange-light: #fff7ed;
  --gold:   #eab308; --gold-light: #fefce8;
  --red:    #ef4444; --red-light: #fef2f2;
  --indigo: #6366f1; --indigo-light: #eef2ff;
  --emerald:#059669; --emerald-light: #d1fae5;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;

  --transition: all .18s ease;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ── RESET ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 14px; scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg-app);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
}
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
input, select, textarea, button { font-family: inherit; outline: none; }
button { cursor: pointer; }

/* ── SIDEBAR ────────────────────────────────────────────────── */
.sidebar {
  position: fixed; top: 0; left: 0; bottom: 0;
  width: var(--sidebar-w);
  background: var(--bg-sidebar);
  display: flex; flex-direction: column;
  z-index: 100;
  transition: width .25s ease;
  overflow: hidden;
}
.sidebar.collapsed { width: var(--sidebar-collapsed-w); }

.sidebar-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 16px;
  border-bottom: 1px solid #1e293b;
  min-height: var(--topbar-h);
  flex-shrink: 0;
}
.sidebar-logo { display: flex; align-items: center; gap: 10px; }
.sidebar-logo i {
  font-size: 20px; color: var(--blue);
  background: rgba(59,130,246,.15);
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm); flex-shrink: 0;
}
.sidebar-title { font-size: 16px; font-weight: 700; color: #fff; white-space: nowrap; }
.sidebar-toggle {
  background: none; border: none; color: var(--text-sidebar);
  font-size: 16px; padding: 6px;
  border-radius: var(--radius-sm); transition: var(--transition); flex-shrink: 0;
}
.sidebar-toggle:hover { background: var(--bg-sidebar-hover); color: #fff; }

.sidebar-search {
  padding: 12px 16px;
  display: flex; align-items: center; gap: 8px;
  border-bottom: 1px solid #1e293b;
  flex-shrink: 0;
}
.sidebar-search i { color: var(--text-sidebar); font-size: 13px; }
.sidebar-search input {
  background: none; border: none; color: #fff; font-size: 13px; flex: 1;
  min-width: 0;
}
.sidebar-search input::placeholder { color: var(--text-sidebar); }
.sidebar.collapsed .sidebar-search { display: none; }

.nav-list {
  flex: 1; overflow-y: auto; overflow-x: hidden;
  padding: 10px 0; scrollbar-width: thin; scrollbar-color: #334155 transparent;
}
.nav-list::-webkit-scrollbar { width: 4px; }
.nav-list::-webkit-scrollbar-track { background: transparent; }
.nav-list::-webkit-scrollbar-thumb { background: #334155; border-radius: 4px; }

.nav-section-label {
  padding: 10px 16px 4px;
  font-size: 9.5px; font-weight: 700; letter-spacing: 1px;
  color: #475569; text-transform: uppercase;
  white-space: nowrap; overflow: hidden;
}
.sidebar.collapsed .nav-section-label { opacity: 0; pointer-events: none; }

.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 16px; cursor: pointer;
  color: var(--text-sidebar); font-size: 13.5px; font-weight: 500;
  transition: var(--transition); position: relative;
  border-radius: 0; white-space: nowrap;
}
.nav-item:hover  { background: var(--bg-sidebar-hover); color: #fff; }
.nav-item.active { background: var(--bg-sidebar-active); color: var(--text-sidebar-active); }
.nav-item i      { width: 20px; text-align: center; font-size: 14px; flex-shrink: 0; }
.nav-item span:not(.nav-badge) { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.sidebar.collapsed .nav-item span:not(.nav-badge) { display: none; }

.nav-badge {
  background: var(--blue); color: #fff;
  font-size: 10px; font-weight: 700; min-width: 18px; height: 18px;
  border-radius: 9px; display: flex; align-items: center; justify-content: center;
  padding: 0 4px; flex-shrink: 0;
}
.nav-badge-warning { background: var(--orange); }
.nav-badge-success { background: var(--green); }
.sidebar.collapsed .nav-badge { display: none; }
.sidebar.collapsed .nav-section-label + li { margin-top: 0; }

/* ── SIDEBAR FOOTER ─────────────────────────────────────────── */
.sidebar-footer {
  padding: 14px 16px;
  border-top: 1px solid #1e293b;
  flex-shrink: 0;
}
.sidebar-user { display: flex; align-items: center; gap: 10px; }
.user-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--indigo));
  color: #fff; font-size: 14px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.user-info { display: flex; flex-direction: column; min-width: 0; }
.user-name { font-size: 13px; font-weight: 600; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-role { font-size: 11px; color: var(--text-sidebar); }
.sidebar.collapsed .user-info { display: none; }

/* ── MAIN WRAPPER ───────────────────────────────────────────── */
.main-wrapper {
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  display: flex; flex-direction: column;
  transition: margin-left .25s ease;
}
.main-wrapper.collapsed { margin-left: var(--sidebar-collapsed-w); }

/* ── TOPBAR ─────────────────────────────────────────────────── */
.topbar {
  height: var(--topbar-h);
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 20px; gap: 12px;
  position: sticky; top: 0; z-index: 90;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
  flex-shrink: 0;
}
.topbar-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.topbar-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

.breadcrumb-nav { font-size: 14px; font-weight: 600; color: var(--text-primary); white-space: nowrap; }

/* Global filters in topbar */
.global-filters { display: flex; align-items: center; gap: 6px; }
.filter-select {
  padding: 6px 10px;
  border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  font-size: 12px; background: var(--bg-card); color: var(--text-primary);
  transition: var(--transition); max-width: 180px; cursor: pointer;
  -webkit-appearance: none; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' fill='none'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%2364748b' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 8px center;
  padding-right: 28px;
}
.filter-select:focus { border-color: var(--border-focus); box-shadow: 0 0 0 3px rgba(59,130,246,.1); }
#filterYear   { max-width: 82px; }
#filterMonth  { max-width: 138px; }
#filterWeek   { max-width: 210px; }

.btn-icon {
  width: 34px; height: 34px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: 13px;
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition); position: relative; flex-shrink: 0;
}
.btn-icon:hover { background: var(--bg-app); color: var(--text-primary); }
.dot-badge {
  position: absolute; top: 5px; right: 5px;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--red);
}

/* ── CONTENT AREA ───────────────────────────────────────────── */
.content-area { flex: 1; padding: 20px 24px; overflow-x: hidden; }
.view { display: none; }
.view.active { display: block; }

.view-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px; flex-wrap: wrap; gap: 12px;
}
.view-header h1 { font-size: 20px; font-weight: 700; color: var(--text-primary); }
.view-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ── BUTTONS ────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 600;
  transition: var(--transition); border: none; white-space: nowrap; cursor: pointer;
}
.btn-primary  { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-dark); box-shadow: var(--shadow-md); }
.btn-outline  { background: transparent; border: 1.5px solid var(--border); color: var(--text-secondary); }
.btn-outline:hover { border-color: var(--blue); color: var(--blue); background: var(--blue-light); }
.btn-ghost    { background: transparent; color: var(--text-secondary); border: none; }
.btn-ghost:hover { background: var(--bg-app); }
.btn-danger   { background: var(--red); color: #fff; }
.btn-danger:hover { background: #dc2626; }
.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-chip {
  padding: 4px 12px; border-radius: 20px;
  font-size: 11px; font-weight: 600;
  border: 1.5px solid var(--border); background: transparent;
  color: var(--text-secondary); cursor: pointer; transition: var(--transition);
}
.btn-chip.active, .btn-chip:hover { background: var(--blue); color: #fff; border-color: var(--blue); }

/* ── WEEK BANNER ────────────────────────────────────────────── */
.week-banner {
  background: linear-gradient(135deg, #1e40af 0%, #3b82f6 50%, #06b6d4 100%);
  border-radius: var(--radius-lg);
  padding: 16px 22px;
  color: #fff;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 14px;
  margin-bottom: 18px;
  box-shadow: 0 4px 14px rgba(30,64,175,.35);
  position: relative; overflow: hidden;
}
.week-banner::before {
  content: '';
  position: absolute; top: -20px; right: -20px;
  width: 120px; height: 120px;
  background: rgba(255,255,255,.08);
  border-radius: 50%;
}
.week-banner-left { display: flex; align-items: center; gap: 14px; z-index: 1; }
.week-banner-left > i {
  font-size: 22px; background: rgba(255,255,255,.2);
  width: 46px; height: 46px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.week-banner-label {
  display: block; font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 1.2px; opacity: .85;
}
.week-banner-title {
  display: block; font-size: 15px; font-weight: 800; line-height: 1.3;
  margin-top: 2px;
}
.week-banner-right { display: flex; gap: 8px; flex-wrap: wrap; z-index: 1; }
.week-stat {
  display: flex; flex-direction: column; align-items: center;
  background: rgba(255,255,255,.18);
  border-radius: var(--radius-md);
  padding: 8px 14px; min-width: 74px;
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255,255,255,.2);
}
.week-stat-value { font-size: 20px; font-weight: 800; line-height: 1.2; }
.week-stat-label {
  font-size: 9px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .6px; opacity: .88; margin-top: 2px; white-space: nowrap;
  text-align: center;
}

/* ── KPI CARDS ──────────────────────────────────────────────── */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}
.kpi-grid-4 { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.kpi-grid-5 { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }

.kpi-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 16px 16px 14px;
  display: flex; flex-direction: column; gap: 10px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  transition: var(--transition);
  position: relative; overflow: hidden;
}
.kpi-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
}
.kpi-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

/* Color stripes */
.kpi-card.kpi-blue::before    { background: var(--blue); }
.kpi-card.kpi-teal::before    { background: var(--teal); }
.kpi-card.kpi-green::before   { background: var(--green); }
.kpi-card.kpi-purple::before  { background: var(--purple); }
.kpi-card.kpi-orange::before  { background: var(--orange); }
.kpi-card.kpi-gold::before    { background: var(--gold); }
.kpi-card.kpi-red::before     { background: var(--red); }
.kpi-card.kpi-indigo::before  { background: var(--indigo); }
.kpi-card.kpi-emerald::before { background: var(--emerald); }

/* Row: icon + numbers */
.kpi-top { display: flex; align-items: flex-start; gap: 12px; }
.kpi-icon {
  width: 40px; height: 40px; border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; flex-shrink: 0;
}
.kpi-blue    .kpi-icon { background: var(--blue-light);    color: var(--blue); }
.kpi-teal    .kpi-icon { background: var(--teal-light);    color: var(--teal); }
.kpi-green   .kpi-icon { background: var(--green-light);   color: var(--green); }
.kpi-purple  .kpi-icon { background: var(--purple-light);  color: var(--purple); }
.kpi-orange  .kpi-icon { background: var(--orange-light);  color: var(--orange); }
.kpi-gold    .kpi-icon { background: var(--gold-light);    color: var(--gold); }
.kpi-red     .kpi-icon { background: var(--red-light);     color: var(--red); }
.kpi-indigo  .kpi-icon { background: var(--indigo-light);  color: var(--indigo); }
.kpi-emerald .kpi-icon { background: var(--emerald-light); color: var(--emerald); }

.kpi-body { flex: 1; min-width: 0; overflow: hidden; }
.kpi-value {
  display: block; font-size: 18px; font-weight: 800;
  color: var(--text-primary); line-height: 1.15;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: 100%;
}
.kpi-label {
  display: block; font-size: 11px; font-weight: 600;
  color: var(--text-secondary); margin-top: 3px;
  line-height: 1.3; white-space: normal; word-break: break-word;
}
/* Trend — separate row at the bottom */
.kpi-trend {
  font-size: 10px; font-weight: 600;
  color: var(--text-secondary);
  padding-top: 8px;
  border-top: 1px solid var(--border);
  line-height: 1.4;
  word-break: break-word;
  min-height: 22px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.kpi-trend.up      { color: var(--green); }
.kpi-trend.down    { color: var(--red); }
.kpi-trend.neutral { color: var(--text-secondary); }
.kpi-trend i { font-size: 10px; margin-right: 2px; }

/* ── CHART CARDS ────────────────────────────────────────────── */
.charts-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px; margin-bottom: 18px;
}
.charts-row-3 { grid-template-columns: repeat(3, 1fr); }
.chart-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  min-width: 0; overflow: hidden;
}
.chart-card.chart-wide { grid-column: span 2; }
.chart-card-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px; gap: 8px;
}
.chart-card-header h3 {
  font-size: 13.5px; font-weight: 700; color: var(--text-primary);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.chart-actions { display: flex; gap: 6px; flex-shrink: 0; }

/* ── TABLE CARDS ────────────────────────────────────────────── */
.table-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  margin-bottom: 18px; overflow: hidden;
}
.table-card-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 18px; border-bottom: 1px solid var(--border);
  flex-wrap: nowrap; gap: 10px;
}
.table-card-header h3 {
  font-size: 13.5px; font-weight: 700; color: var(--text-primary);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  flex: 1; min-width: 0;
}
.table-card-header > * { flex-shrink: 0; }
.table-card-header h3 { flex-shrink: 1; }
.table-card-actions { display: flex; gap: 8px; }

/* Cierres semana en curso */
.semana-badge-icon {
  width: 32px; height: 32px; border-radius: 8px;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 13px; flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(34,197,94,.3);
}
#dashCierresSemana thead tr th { background: linear-gradient(90deg,#f0fdf4,#f8fafc); }
.cierre-semana-empty {
  text-align: center; color: #94a3b8; padding: 22px 16px;
  font-style: italic; font-size: 13px;
}

.table-meta {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 18px; border-bottom: 1px solid var(--border); background: #fafbfc;
}
.table-meta span { font-size: 12px; color: var(--text-secondary); font-weight: 500; }
.table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* ── DATA TABLE ─────────────────────────────────────────────── */
.data-table { width: 100%; border-collapse: collapse; font-size: 12.5px; table-layout: auto; }
.data-table th {
  padding: 9px 12px;
  text-align: left; font-size: 10.5px; font-weight: 700;
  color: var(--text-secondary); text-transform: uppercase; letter-spacing: .5px;
  border-bottom: 2px solid var(--border); background: #fafbfc;
  white-space: nowrap; position: sticky; top: 0; z-index: 2;
}
.data-table td {
  padding: 9px 12px;
  border-bottom: 1px solid #f1f5f9;
  color: var(--text-primary); vertical-align: middle;
}
/* Specific column classes for controlled widths */
.data-table td.td-truncate,
.data-table td.td-name {
  max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.data-table td.td-name { font-weight: 600; }
.data-table td.td-notas   { max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: help; }
.data-table td.td-nowrap  { white-space: nowrap; overflow: hidden; }
.data-table td.td-actions { white-space: nowrap; overflow: visible; min-width: 80px; }
.data-table tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover td { background: #f8fafc; }
/* Prevent text overflow in data cells, but not action cells */
.data-table td:not(.td-actions):not(.td-notes):not(.td-flow):not(.td-wide) {
  max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
/* Celda con botones o contenido flexible */
.data-table td.td-flow {
  white-space: normal; overflow: visible; max-width: none; min-width: 160px;
}
.data-table td.td-wide {
  white-space: normal; overflow: visible; max-width: 300px;
}

.table-totals td {
  padding: 9px 12px; font-weight: 700;
  background: linear-gradient(90deg,#eef2ff,#f0fdf4);
  border-top: 2px solid #e0e7ff; font-size: 12.5px;
  white-space: nowrap;
}

/* Month-row clickable */
.month-row { cursor: pointer; transition: var(--transition); }
.month-row:hover td { background: var(--blue-light) !important; }
.month-row td { font-weight: 600; }
.month-chevron { color: var(--blue); transition: var(--transition); }

/* ── TWO-COL GRID ───────────────────────────────────────────── */
.two-col-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 18px;
}

/* ── BADGES ─────────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 3px 8px; border-radius: 20px;
  font-size: 11px; font-weight: 600; white-space: nowrap;
  max-width: 100%; overflow: hidden; text-overflow: ellipsis;
}
.badge-blue    { background: var(--blue-light);    color: var(--blue-dark); }
.badge-teal    { background: var(--teal-light);    color: #0d9488; }
.badge-green   { background: var(--green-light);   color: #15803d; }
.badge-purple  { background: var(--purple-light);  color: #7e22ce; }
.badge-orange  { background: var(--orange-light);  color: #c2410c; }
.badge-gold    { background: var(--gold-light);    color: #a16207; }
.badge-red     { background: var(--red-light);     color: #b91c1c; }
.badge-gray    { background: #f1f5f9;              color: #475569; }
.badge-indigo  { background: var(--indigo-light);  color: #4338ca; }

/* Stage badges */
.badge-stage-nuevo      { background: #f1f5f9;   color: #475569; }
.badge-stage-seguimiento{ background: #eff6ff;   color: #1d4ed8; }
.badge-stage-visita     { background: var(--purple-light); color: #7e22ce; }
.badge-stage-cotizacion { background: var(--gold-light);   color: #a16207; }
.badge-stage-en-cierre  { background: #fef3c7;   color: #b45309; font-weight: 600; }
.badge-stage-cerrado    { background: var(--green-light);  color: #15803d; }
.badge-stage-perdido    { background: var(--red-light);    color: #b91c1c; }

/* ── LEADSALES IMPORT STYLES ────────────────────────────────── */
.ls-import-banner {
  padding: 12px 18px; border-radius: var(--radius-md); margin: 12px 0;
  display: flex; align-items: center; gap: 10px;
  font-size: 13px; font-weight: 500; line-height: 1.4;
}
.ls-import-banner.info    { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }
.ls-import-banner.success { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }
.ls-import-banner.error   { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }

/* Canal badges for LeadSales */
.canal-ig { background: linear-gradient(135deg,#f8e1f4,#fce4ec); color: #c2185b; }
.canal-wa { background: #e8f5e9; color: #2e7d32; }
.canal-ms { background: #e8eaf6; color: #3949ab; }
.canal-fb { background: #e3f2fd; color: #1565c0; }

/* LeadSales stage chips */
.ls-etapa-chip {
  display: inline-flex; align-items: center; padding: 2px 8px;
  border-radius: 12px; font-size: 10.5px; font-weight: 700;
  white-space: nowrap;
}
.ls-Lead     { background: #eff6ff; color: #1d4ed8; }
.ls-Lead100  { background: #e0f2fe; color: #0369a1; }
.ls-Lead100m { background: #f0f9ff; color: #0284c7; }
.ls-Grad     { background: #f0fdf4; color: #15803d; }
.ls-Cot      { background: #fefce8; color: #a16207; }
.ls-Vis      { background: #faf5ff; color: #7e22ce; }
.ls-Desc     { background: #fef2f2; color: #b91c1c; }
.ls-default  { background: #f1f5f9; color: #64748b; }

/* Stage legend chips on import screen */
.ls-stage-legend { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.ls-stage-chip {
  padding: 3px 9px; border-radius: 12px;
  font-size: 11px; font-weight: 600;
}
.chip-lead     { background: #eff6ff; color: #1d4ed8; }
.chip-lead100  { background: #e0f2fe; color: #0369a1; }
.chip-lead100m { background: #f0f9ff; color: #0284c7; }
.chip-grad     { background: #f0fdf4; color: #15803d; }
.chip-cot      { background: #fefce8; color: #a16207; }
.chip-desc     { background: #fef2f2; color: #b91c1c; }

/* Preview stats pills */
.ls-stat-pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px; border-radius: 14px;
  font-size: 12px; font-weight: 600;
}
.ls-stat-pill i { font-size: 11px; }

/* Duplicate / new badges */
.dup-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; border-radius: 12px;
  background: #fef9c3; color: #a16207;
  font-size: 10px; font-weight: 700; white-space: nowrap;
}
.new-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; border-radius: 12px;
  background: #f0fdf4; color: #15803d;
  font-size: 10px; font-weight: 700; white-space: nowrap;
}

/* LeadSales hero section */
.leadsales-import-hero {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 16px;
  background: linear-gradient(135deg, #1e40af 0%, #3b82f6 60%, #06b6d4 100%);
  border-radius: var(--radius-lg); padding: 20px 24px;
  color: #fff; margin-bottom: 16px;
  box-shadow: 0 4px 14px rgba(30,64,175,.3);
}
.leadsales-hero-left { display: flex; align-items: flex-start; gap: 14px; flex: 1; }
.leadsales-hero-left h2 { font-size: 16px; font-weight: 800; margin-bottom: 4px; }
.leadsales-hero-left p { font-size: 12px; opacity: .9; line-height: 1.5; max-width: 480px; }
.leadsales-logo {
  width: 44px; height: 44px; background: rgba(255,255,255,.2);
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 20px; flex-shrink: 0;
}
.leadsales-hero-right { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.btn-leadsales {
  padding: 10px 20px; background: rgba(255,255,255,.95); color: #1d4ed8;
  border: none; border-radius: var(--radius-md);
  font-size: 13px; font-weight: 700; cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px;
  transition: var(--transition); white-space: nowrap;
  box-shadow: 0 2px 8px rgba(0,0,0,.15);
}
.btn-leadsales:hover { background: #fff; box-shadow: 0 4px 16px rgba(0,0,0,.2); transform: translateY(-1px); }

/* Checkbox in table */
.check-yes { color: var(--green); font-size: 13px; }
.check-no  { color: #cbd5e1;     font-size: 13px; }

/* ── ROW ACTIONS ────────────────────────────────────────────── */
.row-actions { display: flex; gap: 4px; flex-wrap: nowrap; align-items: center; }
.action-btn {
  width: 26px; height: 26px; border: 1px solid var(--border);
  border-radius: var(--radius-sm); background: none;
  color: var(--text-secondary); font-size: 11px;
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition); flex-shrink: 0;
}
.action-btn:hover { background: var(--blue-light); color: var(--blue); border-color: var(--blue); }
.action-btn.danger:hover { background: var(--red-light); color: var(--red); border-color: var(--red); }

/* ── FLOW BUTTONS ───────────────────────────────────────────── */
.flow-btns { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; justify-content: center; }
.flow-btns-col { flex-direction: column; align-items: stretch; gap: 3px; }

.btn-cerrar-trato {
  display: inline-flex !important; align-items: center !important;
  height: 26px !important; padding: 0 10px !important;
  background: linear-gradient(135deg, #16a34a, #22c55e) !important;
  color: #fff !important; border: 1px solid #16a34a !important;
  font-size: 11px !important; font-weight: 700 !important;
  gap: 4px; white-space: nowrap; border-radius: var(--radius-sm) !important;
  cursor: pointer; transition: var(--transition) !important;
}
.btn-cerrar-trato:hover {
  background: linear-gradient(135deg,#15803d,#16a34a) !important;
  box-shadow: 0 2px 8px rgba(22,163,74,.4) !important;
  transform: translateY(-1px) !important;
}
.btn-subir-cierre {
  display: inline-flex !important; align-items: center !important;
  height: 26px !important; padding: 0 10px !important;
  background: linear-gradient(135deg, #4f46e5, #6366f1) !important;
  color: #fff !important; border: 1px solid #4f46e5 !important;
  font-size: 11px !important; font-weight: 700 !important;
  gap: 4px; white-space: nowrap; border-radius: var(--radius-sm) !important;
  cursor: pointer; transition: var(--transition) !important;
}
.btn-subir-cierre:hover {
  background: linear-gradient(135deg,#4338ca,#4f46e5) !important;
  box-shadow: 0 2px 8px rgba(99,102,241,.4) !important;
  transform: translateY(-1px) !important;
}

/* Botón "Sin contrato" – Cerrado sin contratación */
.btn-cerrado-sin {
  display: inline-flex !important; align-items: center !important;
  height: 26px !important; padding: 0 10px !important;
  background: linear-gradient(135deg, #f97316, #ea580c) !important;
  color: #fff !important; border: 1px solid #ea580c !important;
  font-size: 11px !important; font-weight: 700 !important;
  gap: 4px; white-space: nowrap; border-radius: var(--radius-sm) !important;
  cursor: pointer; transition: var(--transition) !important;
}
.btn-cerrado-sin:hover {
  background: linear-gradient(135deg,#ea580c,#c2410c) !important;
  box-shadow: 0 2px 8px rgba(249,115,22,.4) !important;
  transform: translateY(-1px) !important;
}

/* Pronóstico row action buttons container */
.pron-actions {
  display: flex; flex-wrap: wrap; gap: 4px; align-items: center;
  min-width: 200px;
}
.pron-actions .btn-cerrar-trato,
.pron-actions .btn-subir-cierre,
.pron-actions .btn-cerrado-sin { flex: 1 1 auto; min-width: 80px; justify-content: center; }

/* ── Botón Quitar de Seguimiento ── */
.btn-quitar-seg {
  display: inline-flex !important; align-items: center !important;
  gap: 4px; height: 26px !important; padding: 0 10px !important;
  background: linear-gradient(135deg,#3b82f6,#1d4ed8) !important;
  color: #fff !important; border: 1px solid #1d4ed8 !important;
  font-size: 11px !important; font-weight: 700 !important;
  white-space: nowrap; border-radius: var(--radius-sm) !important;
  cursor: pointer; transition: var(--transition) !important;
}
.btn-quitar-seg:hover {
  background: linear-gradient(135deg,#1d4ed8,#1e40af) !important;
  box-shadow: 0 2px 8px rgba(59,130,246,.4) !important;
  transform: translateY(-1px) !important;
}

/* ── Opciones de acción en modal Quitar Seguimiento ── */
.seg-accion-opt {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 11px 14px; border: 1.5px solid #e2e8f0;
  border-radius: 10px; cursor: pointer;
  transition: all .18s; background: #fff;
}
.seg-accion-opt:hover {
  border-color: #a5b4fc; background: #f5f3ff;
}
.seg-accion-opt.selected {
  border-color: #6366f1; background: #f5f3ff;
  box-shadow: 0 0 0 3px rgba(99,102,241,.15);
}
.seg-accion-opt .seg-accion-icon {
  width: 36px; height: 36px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 15px; flex-shrink: 0; margin-top: 1px;
}
.seg-accion-opt div strong {
  font-size: 13px; color: #1e293b; display: block; margin-bottom: 2px;
}
.seg-accion-opt div p {
  font-size: 11px; color: #64748b; margin: 0; line-height: 1.4;
}
/* Colores por acción al seleccionar */
#segOptPron.selected    { border-color: #6366f1; background: #f5f3ff; }
#segOptPerdido.selected { border-color: #ef4444; background: #fef2f2; }
#segOptNuevo.selected   { border-color: #94a3b8; background: #f8fafc; }


.btn-confirmar-cierre {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 12px; height: 26px;
  background: linear-gradient(135deg, #3b82f6, #6366f1); color: #fff;
  border: none; border-radius: 20px;
  font-size: 11px; font-weight: 700; cursor: pointer;
  transition: all .2s; white-space: nowrap;
}
.btn-confirmar-cierre:hover {
  background: linear-gradient(135deg,#2563eb,#4f46e5);
  box-shadow: 0 2px 8px rgba(59,130,246,.4); transform: translateY(-1px);
}

.btn-regresar {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 9px; background: #f8fafc; color: #64748b;
  border: 1px solid #cbd5e1; border-radius: 14px;
  font-size: 10px; font-weight: 700; cursor: pointer;
  transition: all .18s; white-space: nowrap;
}
.btn-regresar:hover { background: #fef3c7; color: #b45309; border-color: #fcd34d; }
.btn-regresar-pron:hover { background: #ede9fe; color: #7c3aed; border-color: #c4b5fd; }
.btn-regresar-sm { font-size: 10px; padding: 3px 7px; }
.btn-regresar-icon { color: #94a3b8 !important; }
.btn-regresar-icon:hover { background: #fef3c7 !important; color: #b45309 !important; border-color: #fcd34d !important; }

.badge-confirmado {
  display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px;
  background: #f0fdf4; color: #16a34a; border: 1px solid #bbf7d0;
  border-radius: 20px; font-size: 10px; font-weight: 600; white-space: nowrap;
}

/* ── CIERRE ROW STATES ──────────────────────────────────────── */
.cierre-confirmado-row td { background: #f0fdf4 !important; }
.cierre-pendiente-row  td { background: #fffbeb !important; }

/* ── MODAL CERRAR TRATO ─────────────────────────────────────── */
.btn-success {
  padding: 9px 20px; background: linear-gradient(135deg,#16a34a,#22c55e);
  color: #fff; border: none; border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 700; display: inline-flex; align-items: center; gap: 6px;
  transition: all .2s; cursor: pointer;
}
.btn-success:hover {
  background: linear-gradient(135deg,#15803d,#16a34a);
  box-shadow: 0 4px 12px rgba(22,163,74,.4); transform: translateY(-1px);
}
.ct-source-card, .ct-finance-card {
  background: var(--bg-app); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 14px 16px; margin-bottom: 14px;
}
.ct-source-label {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .5px; color: #6366f1; display: flex; align-items: center; gap: 6px;
  margin-bottom: 10px;
}
.ct-summary-bar {
  background: #f1f5f9; border: 1px dashed #cbd5e1;
  border-radius: var(--radius-md); padding: 10px 16px;
  color: #64748b; font-size: 12px; display: flex; align-items: center;
}
.ct-summary-bar.ct-summary-active {
  background: #f0fdf4; border: 1px solid #bbf7d0;
  color: var(--text-primary); gap: 20px; flex-wrap: wrap;
}
.ct-sum-item { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 80px; }
.ct-sum-item span    { font-size: 10px; color: #64748b; font-weight: 500; }
.ct-sum-item strong  { font-size: 14px; color: #16a34a; }

/* ── FILTER BAR ─────────────────────────────────────────────── */
.filter-bar { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.filter-group { flex: 1; min-width: 140px; max-width: 220px; }
.filter-input {
  width: 100%; padding: 7px 11px;
  border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  font-size: 12.5px; background: var(--bg-card); color: var(--text-primary);
  transition: var(--transition);
}
.filter-input:focus { border-color: var(--border-focus); box-shadow: 0 0 0 3px rgba(59,130,246,.1); }

/* ── PAGINATION ─────────────────────────────────────────────── */
.pagination-controls { display: flex; align-items: center; gap: 8px; }
.pagination-controls span { font-size: 12px; color: var(--text-secondary); }

/* ── MODALS ─────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.45); backdrop-filter: blur(2px);
  z-index: 200; display: none; align-items: center; justify-content: center; padding: 20px;
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--bg-card); border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg); width: 100%; max-width: 580px;
  max-height: 90vh; display: flex; flex-direction: column; overflow: hidden;
}
.modal-lg { max-width: 720px; }
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 22px; border-bottom: 1px solid var(--border);
  background: linear-gradient(135deg,#f8fafc,#fff); flex-shrink: 0;
}
.modal-header h2 { font-size: 15px; font-weight: 700; }
.modal-close {
  width: 30px; height: 30px; border: none; background: var(--bg-app);
  border-radius: var(--radius-sm); color: var(--text-secondary); font-size: 13px;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  transition: var(--transition); flex-shrink: 0;
}
.modal-close:hover { background: var(--red-light); color: var(--red); }
.modal-body { padding: 20px 22px; overflow-y: auto; flex: 1; }
.modal-footer {
  padding: 12px 22px; border-top: 1px solid var(--border);
  display: flex; justify-content: flex-end; gap: 10px;
  background: #fafbfc; flex-shrink: 0;
}

/* Form grid */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-group { display: flex; flex-direction: column; gap: 5px; }
.form-group label { font-size: 11.5px; font-weight: 600; color: var(--text-secondary); }
.form-group input, .form-group select, .form-group textarea {
  padding: 8px 11px; border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); font-size: 13px;
  background: var(--bg-card); color: var(--text-primary); transition: var(--transition);
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  border-color: var(--border-focus); box-shadow: 0 0 0 3px rgba(59,130,246,.1);
}
.form-group textarea { resize: vertical; min-height: 70px; }
.form-section-title {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .5px; color: var(--text-secondary);
  padding: 10px 0 6px; border-bottom: 1px solid var(--border); margin-bottom: 10px;
  grid-column: 1 / -1;
}
.form-full { grid-column: 1 / -1; }

/* Stage checkboxes */
.stage-checks { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; grid-column: 1/-1; }
.stage-check-item { display: flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 500; cursor: pointer; }
.stage-check-item input[type="checkbox"] { width: 14px; height: 14px; accent-color: var(--blue); }

/* ── TOAST NOTIFICATIONS ────────────────────────────────────── */
#toastContainer {
  position: fixed; bottom: 24px; right: 24px;
  z-index: 9999; display: flex; flex-direction: column; gap: 8px;
}
.toast {
  padding: 12px 18px; border-radius: var(--radius-md);
  font-size: 13px; font-weight: 600; color: #fff;
  box-shadow: var(--shadow-lg); max-width: 340px;
  animation: toastIn .3s ease; display: flex; align-items: center; gap: 10px;
  pointer-events: none;
}
.toast-success { background: #16a34a; }
.toast-error   { background: var(--red); }
.toast-info    { background: var(--blue); }
.toast-warning { background: var(--orange); }
@keyframes toastIn { from { opacity:0; transform:translateX(40px); } to { opacity:1; transform:translateX(0); } }

/* ── EMPTY STATE ────────────────────────────────────────────── */
.empty-state {
  text-align: center; padding: 40px 20px; color: var(--text-secondary);
}
.empty-state i { font-size: 36px; opacity: .3; margin-bottom: 12px; display: block; }
.empty-state p { font-size: 14px; }

/* ── PRONÓSTICO ─────────────────────────────────────────────── */
.pron-kpis { display: grid; grid-template-columns: repeat(auto-fill,minmax(160px,1fr)); gap: 12px; margin-bottom: 16px; }
.pron-kpi-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 14px 16px;
  box-shadow: var(--shadow-sm); text-align: center;
}
.pron-kpi-value { font-size: 20px; font-weight: 800; display: block; }
.pron-kpi-label { font-size: 11px; color: var(--text-secondary); font-weight: 500; margin-top: 2px; }

/* ── CIERRES ────────────────────────────────────────────────── */
.cierres-nav { display: flex; gap: 10px; margin-bottom: 16px; }
.detail-header { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.detail-header h2 { font-size: 16px; font-weight: 700; }

/* ── MARKETING & GASTOS ─────────────────────────────────────── */
.mkt-kpis { display: grid; grid-template-columns: repeat(auto-fill,minmax(150px,1fr)); gap: 12px; margin-bottom: 16px; }

/* ── SEGUIMIENTO SEMANAL ────────────────────────────────────── */
.seg-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(300px,1fr)); gap: 16px; }
.seg-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 16px 18px; box-shadow: var(--shadow-sm);
}
.seg-card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.seg-card-title  { font-size: 14px; font-weight: 700; }
.seg-lead-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 0; border-bottom: 1px solid #f1f5f9; gap: 10px;
}
.seg-lead-row:last-child { border-bottom: none; }
.seg-lead-name { font-size: 13px; font-weight: 600; }
.seg-lead-meta { font-size: 11px; color: var(--text-secondary); }

/* ── WEEK FILTER BANNER (inside views) ──────────────────────── */
.week-filter-bar {
  display: flex; align-items: center; gap: 10px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 10px 16px;
  margin-bottom: 16px; flex-wrap: wrap;
}
.week-filter-bar label {
  font-size: 12px; font-weight: 600; color: var(--text-secondary); white-space: nowrap;
}
.week-filter-bar select { flex: 1; min-width: 160px; max-width: 260px; }

/* ── SYNC VIEW ───────────────────────────────────────────────── */
.sync-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.sync-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 20px;
  box-shadow: var(--shadow-sm);
}
.sync-card h3 { font-size: 14px; font-weight: 700; margin-bottom: 8px; }
.sync-card p { font-size: 12.5px; color: var(--text-secondary); line-height: 1.5; }
.sync-drop-zone {
  border: 2px dashed var(--border); border-radius: var(--radius-md);
  padding: 30px 20px; text-align: center; margin-top: 12px;
  color: var(--text-secondary); font-size: 13px; cursor: pointer;
  transition: var(--transition);
}
.sync-drop-zone:hover { border-color: var(--blue); background: var(--blue-light); color: var(--blue); }
.sync-drop-zone i { font-size: 28px; display: block; margin-bottom: 10px; opacity: .5; }

/* ── RESPONSIVE ─────────────────────────────────────────────── */
@media (max-width: 1200px) {
  .kpi-grid { grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); }
}
@media (max-width: 1100px) {
  .charts-row { grid-template-columns: 1fr 1fr; }
  .chart-card.chart-wide { grid-column: span 2; }
  .kpi-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 900px) {
  .kpi-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .two-col-grid { grid-template-columns: 1fr; }
  .charts-row { grid-template-columns: 1fr; }
  .chart-card.chart-wide { grid-column: span 1; }
  .pron-actions { min-width: auto; }
}
@media (max-width: 768px) {
  :root { --sidebar-w: 0px; }
  .sidebar { transform: translateX(-100%); transition: transform .25s ease; }
  .sidebar.mobile-open { transform: translateX(0); width: 240px; }
  .main-wrapper { margin-left: 0 !important; }
  .content-area { padding: 14px 16px; }
  .week-banner { flex-direction: column; text-align: center; gap: 10px; }
  .week-banner-right { justify-content: center; }
  .week-banner-title { font-size: 13px; }
  .topbar { padding: 8px 14px; }
  .global-filters { gap: 4px; }
  .filter-select { font-size: 11px; padding: 5px 7px; }
  #filterYear { max-width: 70px; }
  #filterMonth { max-width: 100px; }
  #filterWeek { max-width: 130px; }
  .form-grid { grid-template-columns: 1fr; }
  .kpi-grid { grid-template-columns: 1fr 1fr; }
  .view-header { margin-bottom: 14px; }
  .view-header h1 { font-size: 17px; }
}
@media (max-width: 480px) {
  .kpi-grid { grid-template-columns: 1fr 1fr; }
  .kpi-value { font-size: 16px; }
  .pron-actions { flex-wrap: wrap; min-width: 0; }
  .pron-actions .btn-cerrar-trato,
  .pron-actions .btn-subir-cierre,
  .pron-actions .btn-cerrado-sin { min-width: 70px; }
  .two-col-grid { grid-template-columns: 1fr; }
  .week-stat { min-width: 64px; padding: 7px 10px; }
  .week-stat-value { font-size: 17px; }
}

/* ── IMPORT STATUS (Sync view) ──────────────────────────────── */
.import-status {
  margin-top: 12px; padding: 10px 14px;
  border-radius: var(--radius-md); font-size: 13px; font-weight: 500;
  line-height: 1.4;
}
.import-status.info    { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }
.import-status.success { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }
.import-status.error   { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }

.import-history-list { margin-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.import-history-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 10px; background: #f8fafc;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-size: 12px; color: var(--text-secondary);
}
.import-history-item strong { color: var(--text-primary); }

/* ── DASHBOARD MINI PIPELINE ────────────────────────────────── */
#dashPipeline td { cursor: default; }
#dashRecentLeads .badge { max-width: 100px; }

