:root {
  --quora-dark: #1b2a4a;
  --quora-accent: #3b6fd4;
}

body { background: #f4f6f9; }

/* ── Sidebar ── */
.sidebar {
  width: 230px;
  min-height: 100vh;
  background: var(--quora-dark);
  position: sticky;
  top: 0;
  z-index: 1040;
}
.sidebar .brand { color: #fff; }
.sidebar .nav-link { color: #b8c2d8; border-radius: 8px; }
.sidebar .nav-link:hover { color: #fff; background: rgba(255,255,255,.08); }
.sidebar .nav-link.active { background: var(--quora-accent); color: #fff; }
.torre-selector { background: rgba(255,255,255,.1); color: #fff; border: 1px solid rgba(255,255,255,.2); }
.torre-selector:hover { background: rgba(255,255,255,.18); color: #fff; }

.content { min-width: 0; }

/* Menú responsive (móvil) */
.topbar-movil { display: none; }
.sidebar-backdrop { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 1044; }
@media (max-width: 991.98px) {
  .topbar-movil { display: flex; align-items: center; gap: .6rem; background: var(--quora-dark); color: #fff;
    padding: .55rem .8rem; position: sticky; top: 0; z-index: 1043; }
  .sidebar { position: fixed; top: 0; left: 0; height: 100vh; width: 240px; transform: translateX(-100%);
    transition: transform .25s ease; }
  .sidebar.show { transform: translateX(0) !important; box-shadow: 2px 0 14px rgba(0,0,0,.35); }
  .sidebar-backdrop.show { display: block; }
  .content { padding: 1rem !important; }
}

/* ── Auth ── */
.auth-body { background: linear-gradient(135deg, #1b2a4a 0%, #2d4a7a 100%); }

/* ── Cards ── */
.card { border: none; box-shadow: 0 1px 3px rgba(16,24,40,.08); border-radius: 12px; }
.card.kpi { border-left: 4px solid var(--quora-accent); }

/* ── Kanban ── */
.kanban-wrap {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 12px;
  align-items: flex-start;
}
.kanban-col {
  min-width: 230px;
  max-width: 230px;
  background: #eef1f6;
  border-radius: 10px;
  flex-shrink: 0;
}
.kanban-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 10px;
  border-radius: 10px 10px 0 0;
  background: #fff;
}
.kanban-head .small { line-height: 1.15; }
.kanban-body { min-height: 120px; padding: 8px; display: flex; flex-direction: column; gap: 8px; }
.kanban-body.dropzone { background: #dbe7ff; border-radius: 0 0 10px 10px; }
.kanban-card {
  background: #fff;
  border-radius: 8px;
  padding: 8px 10px;
  box-shadow: 0 1px 2px rgba(16,24,40,.1);
  cursor: grab;
}
.kanban-card.dragging { opacity: .5; }

/* ── Torre ── */
.torre { display: flex; flex-direction: column; gap: 4px; }
.torre-piso {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 12px;
  border-radius: 6px;
  border: 1px solid rgba(16,24,40,.12);
  background: #fff;
}
.torre-piso.clicable:hover { outline: 2px solid var(--quora-accent); cursor: pointer; }

/* ── Chips de asignación ── */
.chip {
  color: #fff;
  border-radius: 20px;
  padding: 2px 10px;
  font-size: .75rem;
  white-space: nowrap;
}
.chip .chip-x { color: rgba(255,255,255,.85); text-decoration: none; margin-left: 4px; font-weight: bold; }
.chip .chip-x:hover { color: #fff; }
.chip-vencida { outline: 2px dashed #dc3545; }

/* ── Matriz de embudo por lead ── */
.dot-etapa {
  display: inline-block;
  width: 15px; height: 15px;
  border-radius: 50%;
}
.dot-etapa.pendiente { background: #e7ebf1; border: 1px solid #d3d9e2; }
.dot-etapa.actual { outline: 2px solid #1b2a4a; outline-offset: 1.5px; }
.dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; }

/* ── Pipeline stepper ── */
.pipeline-steps {
  display: flex;
  gap: 4px;
  overflow-x: auto;
}
.step { flex: 1; min-width: 86px; text-align: center; position: relative; padding-top: 4px; }
.step-dot {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: #e4e8ef;
  color: #7a8699;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 4px;
  font-size: .8rem; font-weight: 600;
  border: 2px solid transparent;
}
.step.done .step-dot { background: #d1e7dd; color: #146c43; }
.step.current .step-dot { border-color: var(--quora-accent); background: var(--quora-accent); color: #fff; }
.step-label { font-size: .68rem; color: #7a8699; line-height: 1.15; }
.step.done .step-label, .step.current .step-label { color: #1b2a4a; font-weight: 600; }
.step:hover .step-dot { outline: 2px solid var(--quora-accent); }
